Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To recreate or rebuild the installed version of an R source package, follow these steps:

  1. Install the package development tools by running the following command in R console:
install.packages("devtools")
  1. Load the devtools package by running:
library(devtools)
  1. Use the build() function to build the package from the source. Specify the path to the source package directory as the argument. For example:
build("path/to/package/source")
  1. This will create tar.gz file of the package in the current working directory.

  2. Install the built package by running:

install.packages("path/to/package.tar.gz", repos=NULL, type="source")

The package should now be rebuilt and installed in your R environment.