Friday, February 3, 2012

"knitr" and "ggplot2" for Automatic LaTeX Report Generation with R

knitr is supported under R versions >2.14.1. So I upgraded R, and also needed some extra packages for ggplot2. (probably not all are required for ggplot2 but I am interested in using these packages in my research)

sudo apt-get install libX11-dev libglu1-mesa-dev libxml2-dev libgeos-dev libproj-dev libgdal-dev

Some R packages as well

install.packages(c("rgdal","maps","maptools","rgeos"))

Only, then, was I able to install knitr package according to this post.

install.packages("devtools")
library(devtools)
install_github("ggplot2","hadley")

install_github("knitr","yihui")

2 comments: