Friday, March 10, 2017

Visualization and graphics

This is a topic on which I have struggled in the past. I can do the basics, but I know there is a lot more to it than I have yet to unlock. It seems many in biology who favor R like it for the statistical capabilities, but not so much the graphical aspect. I hope to not fall into that rut.

For these examples I used the "biomass" dataset on https://vincentarelbundock.github.io/Rdatasets/datasets.html

I kept each different plotting device as a function of "Tas" and "year" so I can really explore the base functions of each. Github code found here https://github.com/jcrichardson617/R_class/blob/master/module9

Using R's built in plot() function, the graph looks fairly simple.

Using the lattice package:

And ggplot2:

Having each be very basic like this provided little difficulties, and there is of course room for improvement on each. As the instructor of the course is big into visualization, and talks about ggplot a lot, I am inclined to lean that way. Even from these basic plots though, it seems like ggplot used more code than lattice and plot, so it probably has a steep learning curve.

No comments:

Post a Comment