powered by
Methods for taking a file (".tar.gz", ".zip", ".tgz") and placing it in the repository, all locally.
addPackage( fn, type = c("source", "mac.binary", "win.binary"), repo_dir, is.new = TRUE )
Invisibly returns the number of packages described in the resulting 'PACKAGES', 'PACKAGES.gz' and 'PACKAGES.rds' files. If 0, no packages were found and no files were written.
'PACKAGES'
'PACKAGES.gz'
'PACKAGES.rds'
0
Path to package
Type of package, see explanation in section "Binary packages" in utils::install.packages().
utils::install.packages()
Path to local directory, where the root of the repository is. The (source) packages will be stored locally at {repo_dir}/src/contrib/.
{repo_dir}/src/contrib/
Logical, if TRUE, it causes an error if the file
TRUE
miniCRAN::addLocalPackage(), tools::write_PACKAGES()
miniCRAN::addLocalPackage()
tools::write_PACKAGES()
f <- system.file('extdata/microCRAN_0.1.0.zip', package = 'microCRAN', mustWork = TRUE) root <- tempdir() addPackage(f, type = 'win.binary', repo_dir = root)
Run the code above in your browser using DataLab