README.md

Travis-CI Build Status

maintainr

Stupid simple R package installation tracking.

Introduction

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:

  1. Upgrading my R installation seamlessly on Windows
  2. Keeping track of installed packages across multiple machines used for analysis (work, home, virtual test environment)

Installation

To install maintainr:

library(devtools)
install_github("jknowles/maintainr")
library(maintainr)

Backup Packages

library(maintainr)
myPkgs <- pkg_list()
knitr::kable(head(myPkgs))

| | Package | LibPath | Version | |-----------|:----------|:---------|:--------| | abind | abind | C:/R/lib | 1.4-5 | | acepack | acepack | C:/R/lib | 1.4.1 | | ada | ada | C:/R/lib | 2.0-5 | | AER | AER | C:/R/lib | 1.2-4 | | Amelia | Amelia | C:/R/lib | 1.7.4 | | animation | animation | C:/R/lib | 2.4 |

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)

Functions

Backup R Configuration Files

Coming soon...

To Do

Links that help

Upgrading R on Windows

Install New R on Windows

Contributing

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.



jknowles/maintainr documentation built on May 19, 2019, 11:42 a.m.