cherrypi / Science-Fair_2019

Vernal Pond graphing and data, as well as data analysis.
1 stars 0 forks source link

Get familiar with ggplot #11

Closed VCF closed 5 years ago

VCF commented 5 years ago

R has "built-in" plotting capabilities via plot and some other methods. However, they're considered fairly rudimentary, and are usually used to quickly glance at your data. For publication-quality graphics there's a great package called ggplot2. It can be confusing at first, but it's not too bad once you get over the initially weird syntax.

This is a good introduction to the package. Try out the examples, and then see if you can adapt your data to what you've learned.

cherrypi commented 5 years ago

My terminal claims it can't find the ggplot2 package:

Error in library(ggplot2) : there is no package called ‘ggplot2’

cherrypi commented 5 years ago

Otherwise, I think I'm pretty much good.

VCF commented 5 years ago

That means you haven't installed it yet. Try:

install.packages("ggplot2")
## And remember to use any package, your code should pull it in with library, which
## is generally put at the top of your code.
library("ggplot2")
VCF commented 5 years ago

You have a typo in 5393e8a - look at the error that's being thrown to get a hint of where it is.

VCF commented 5 years ago

Ok, good, fixed in ce5c87d. It looks like you have a good grasp of basic plotting!