# NOT RUN {
pkgSnapFile <- tempfile()
pkgSnapshot(pkgSnapFile, .libPaths()[1])
data.table::fread(pkgSnapFile)
# }
# NOT RUN {
# An example to move this file to a new computer
library(Require)
setLibPaths(.libPaths()[1]) # this will only do a snapshot of the main user library
fileName <- "packageSnapshot.txt"
pkgSnapshot(fileName)
# Get file on another computer -- via email, slack, cloud, etc.
# library(googledrive)
# (out <- googledrive::drive_upload(fileName)) # copy the file id to clipboard
# On new machine
fileName <- "packageSnapshot.txt"
library(Require)
# get the file from email, slack, cloud etc.
# library(googledrive)
# drive_download(as_id(PASTE-THE-FILE-ID-HERE), path = fileName)
setLibPaths("~/RPackages") # start with an empty folder for new
# library to minimize package version conflicts
Require(packageVersionFile = fileName)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab