R programming pitfalls