gapminder data.frameggplot2.How to bring that into R?
read.csv("https://gist.githubusercontent.com/jennybc/924fe242a31e0239762f/raw/ea615f4a811a6e9e8a1fe95020a4407785181a21/2015_STAT545_enrollment.csv")dplyr and understanding the different flavours of R objectsI’ve given two talks this year that discuss the importance of R Markdown in an analytical workflow and how nicely it plays with GitHub. We looked at some of these slides.
R Markdown is not the only way to get a pretty report. You can also get one from an R script.
.R file, RStudio offers a button for this is the spiral bound notebook icon, near where the “Knit HTML” button appears for .Rmd. Click and you get “Compile Notebook”.spin() from the knitr package.ggplot2 tutorial includes alot of Markdown that was made this way, i.e. from .R not .Rmd
#' becomes very important.Rmd) or a by-product (choose .R).I passed around hard copies of these 5 books (note: some links to eBooks and repositories are tuned to UBC users):
R Graphics Cookbook by Winston Chang, O’Reilly (2013). The graphs section of his Cookbook for R website will give you a good sense of the book, which contains more material in greater detail.
ggplot2: Elegant Graphics for Data Analysis available via SpringerLink by Hadley Wickham, Springer (2009) | online docs (nice!) | author’s website for the book, including all the code | author’s landing page for the package
R Graphics, 2nd edition available via StatsNetbase by Paul Murrell, Chapman & Hall/CRC Press (2011) | author’s webpage for the book | GoogleBooks search | companion R package, RGraphics, on CRAN
Dynamic documents with R and knitr by Yihui Xie, part of the CRC Press / Chapman & Hall R Series (2013). ISBN: 9781482203530. No online access (yet?).
Reproducible Research with R & RStudio by Christopher Gandrud, part of the CRC Press / Chapman & Hall R Series (2013). ISBN: 978-1466572843. Book website | Examples and code | Book source. No online access (yet?).