Ask Your Question
4

How can the installed version of the R source package be recreated/rebuilt?

asked 2021-09-29 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-12-08 16:00:00 +0000

lalupa gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-09-29 11:00:00 +0000

Seen: 13 times

Last updated: Dec 08 '21