R Language Installing packages Install local development version of a package


While working on the development of an R package it is often necessary to install the latest version of the package. This can be achieved by first building a source distribution of the package (on the command line)

R CMD build my_package

and then installing it in R. Any running R sessions with previous version of the package loaded will need to reload it.


A more convenient approach uses the devtools package to simplify the process. In an R session with the working directory set to the package directory


will build, install and reload the package.