Given a project directory, makes a new packrat project in the directory.
project = ".",
options = NULL,
enter = TRUE,
restart = enter,
infer.dependencies = TRUE
The directory that contains the R project.
Boolean, enter packrat mode for this project after finishing a init?
init works as follows:
Application dependencies are computed by examining the R code
throughout the project for
require calls. You can
opt out of this behavior by setting
A snapshot is taken of the version of each package currently used by
the project as described in
snapshot, and each package's
sources are downloaded.
A private library is created in the directory.
The snapshot is applied to the directory as described in
init is finished, all the packages
on which the project depends are installed in a new, private library located
inside the project directory.
You must restart your R session in the given project directory after
init in order for the changes to take effect!
When R is started in the directory, it will use the new, private library.
library will load packages
from the private library (except for 'base' or 'recommended' R packages,
which are found in the system library), and functions such as
will modify that private library. You can sync this private library with
restart parameter will only result in a restart of R when the
R environment packrat is running within makes available a restart function
packrat for a description of the files created by
## Not run:
## initialize a project using a local repository of packages
packrat::init(options = list(local.repos = "~/projects/R"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.