Cheatsheets

Cheatsheets are great for refreshing your memory and finding new functions and plots to use.

Learn more R

From your browser

From within R

Find new packages and functions

Books

Searching online

Inside R

Email us!

Troubleshooting

These are a few of the things we personally forget to do all the time and cause 90% of our errors. They’re good first checks if R starts throwing errors or behaving strangely.

Put the + sign here to make ggplot happy:

ggplot(data = mpg, aes(x = displ, y = hwy)) +
    geom_point()

Put it on the next line to make ggplot sad:

ggplot(data = mpg, aes(x = displ, y = hwy))
  + geom_point()

Error messages

Not all error messages are helpful or easy to interpret, but they do seem to be getting better in many R packages. When googling an error message it can help to put the entire message in quotes. For the error below we would search for "Error in fit[5, 100, ] : subscript out of bounds".