I came across this post on StackOverflow about the most useful R tricks people know. I’m sure you can pick up a trick or two in here. Some of my favorites:
- there are head() and tail() commands that operate on data frames. They work just like the *nix counterparts.
- making use of the with() and within() commands to operate on data frames (syntactic sugar).
- Make use of the new.env() command to pass variables by reference.
- The sqldf library allows you to execute SQL queries on data frames.
- Use the do.call() command to feed a list of arguments to a command (works like *nix’ xargs command)