rhcaeb / QFC-course

Programming Fundamentals Using R
0 stars 0 forks source link

complete application 2-7 #19

Closed rhcaeb closed 4 years ago

rhcaeb commented 4 years ago

Application 2-7

Notes

Pending review @belinskyc

belinskyc commented 4 years ago

Everything looks good -- I'll talk a little about R Base Plots and GGPlot (I am also teaching a GGPlot class so this is very fresh on my mind). R Base is better for a quick and dirty plot -- it almost always takes less code to do a plot in R Base -- a lot less if what you are doing is very simple (like a scatterplot of two variables without any modifications). But GGPlot is far better for extensibility. This is because R Base is conceptually based on drawing items on a plot -- think of adding plot information to a transparency. GGPlot is conceptually based upon separating the plot into component parts. These components take more code initially but they can be more easily modified and they can be easily pulled out to be put into another plot -- things that are hard to do in R Base.

OK, that is my very quick spiel on this topic...

rhcaeb commented 4 years ago

I agree- I have explored ggplot() while reading 'R For Data Science (Wickham and Grolemund)';

Of the two I would say ggplot() is a bit more elegant/pleasing to look at.