knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
Stupid simple R package installation tracking.
maintainr
is a simple package with a simple goal -- to produce an export of
installed packages on an R installation and read in that export from another
R installation. Currently, maintainr
provides the ability to backup this list
of installed packages and their version to a Dropbox account via the excellent
rdrop2
package.
This package is not meant to be a way to standardize installs for production systems. Instead, it is to solve two specific problems I have with using R:
To install maintainr
:
library(devtools) install_github("jknowles/maintainr") library(maintainr)
library(maintainr) myPkgs <- pkg_list() knitr::kable(head(myPkgs))
I want to keep this in sync across two machines so I store the list of installed packages to a central location.
pkg_backup(cloudProvider = "dropbox", dest = "/zzz")
This stores a csv file in the specified location.
Now I can sync or restore.
# Path for dropbox is from the root of the Dropbox directory out <- pkg_restore(filename="zzz/RPackageBackup_2016-12-08.csv", cloudProvider = "dropbox", install = FALSE) head(out) pkgList <- read_cloud(filename="zzz/RPackageBackup_2016-12-08.csv", provider = "dropbox") sync_pkgs(pkgList = pkgList, keep_all = TRUE) out <- pkg_restore(filename="zzz/RPackageBackup_2016-12-08.csv", cloudProvider = "dropbox", install = FALSE) head(out)
pkg_list
pkg_backup
save_pkgs
read_pkgs
install_pkgs
sync_pkgs
read_cloud
write_cloud
Coming soon...
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.