Painless installation of R packages from source
I was minding my own business trying to add labels to a line plot in ggplot2
. Then I saw that the package directlabels would solve all my problems with one single line of code. I proceed to install it using install.packages("directlabels", repo="http://r-forge.r-project.org")
. Sadly:
package
directlabels
is not available (for R version 3.1.3)
Usually, I would download the source code, then use install.packages()
from source. But this still did not work due some dependency issues. Thankfully there is the package devtools
to help:
As simple as that. It also allows installation from github repos.