Learn R Programming

⚠️There's a newer version (2.1.2) of this package.Take me there.

reproducible

A set of tools for R that enhance reproducibility beyond package management. Built on top of git2r and archivist, this package aims at making high-level, robust, machine and OS independent tools for making deeply reproducible and reusable content in R. This extends beyond the package management utilities of packrat and checkpoint by including tools for caching and accessing GitHub repositories.

News

See updates from latest CRAN and development versions. Note that versions 1.0.0 and later are not compatible with previous versions "out of the box". However, setting the options("reproducible.useDBI" = FALSE) will return the behaviour to prior versions and so should be compatible. The new version is much faster and creates smaller repository files and allows for different (e.g., RPostgres backends for the database -- not the saved files, however; these are still saved locally).

Installation

Current release (on CRAN)

Install from CRAN:

install.packages("reproducible")

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/reproducible", dependencies = TRUE) 

Development version

Install from GitHub:

#install.packages("devtools")
library("devtools")
install_github("PredictiveEcology/reproducible", ref = "development", dependencies = TRUE) 

Contributions

Please see CONTRIBUTING.md for information on how to contribute to this project.

Copy Link

Version

Install

install.packages('reproducible')

Monthly Downloads

2,317

Version

1.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Eliot J B

Last Published

February 20th, 2020

Functions in reproducible (1.0.0)

basename2

A version of base::basename that is NULL resistant
archiveExtractBinary

Tests if unrar or 7zip exist
.checkCacheRepo

Check for cache repository info in ...
getFunctionName

A set of helpers for Cache
checkAndMakeCloudFolderID

Check for presence of checkFolderID (for Cache(useCloud))
Cache

Cache method that accommodates environments, S4 methods, Rasters, & nested caching
checkoutVersion

Clone, fetch, and checkout from GitHub.com repositories
assessDataType

Assess the appropriate raster layer data type
clearStubArtifacts

Clear erroneous archivist artifacts
.debugCache

Attach debug info to return for Cache
determineFilename

Determine filename, either automatically or manually
getUserTags

Cache helpers
Filenames

Return the filename(s) from a Raster* object
cloudSyncCacheOld

Sync cloud with local Cache
fastMask

Faster operations on rasters
guessAtTarget

Try to pick a file to load
extractFromArchive

Extract files from archive
.grepSysCalls

Grep system calls
assessDataTypeGDAL

Assess the appropriate raster layer data type for GDAL
checkGDALVersion

Check whether the system has a minimum version of GDAL available
available.packagesMem

Memoised version of available.packages
.cacheMessage

Create a custom cache message by class
cloudDownload

Download from cloud, if necessary
cloudCheckOld

Basic tool for using cloud-based caching
.checkForAuxiliaryFiles

Check a neededFile for commonly needed auxiliary files
downloadFile

A wrapper around a set of downloading functions
.removeCacheAtts

Remove attributes that are highly varying
installedVersions

Determine versions all installed packages
cloudUpload

Upload to cloud, if necessary
copySingleFile

Copy a file using robocopy on Windows and rsync on Linux/macOS
cloudUploadFromCache

Upload a file to cloud directly from local cacheRepo
maskInputs

Mask module inputs
mergeCache

Merge two cache repositories together
.prepareFileBackedRaster

Copy the file-backing of a file-backed Raster* object
isInteractive

Alternative to interactive() for unit testing
.preDigestByClass

Any miscellaneous things to do before .robustDigest and after FUN call
preProcess

Download, Checksum, Extract files
newLibPaths

A shortcut to create a .libPaths() with only two directories
normPath

Normalize filepath
createCache

Create a new cache
.prepareOutput

Make any modifications to object recovered from cacheRepo
checkPath

Check directory path
convertPaths

Change the absolute path of a file
compareNA

NA-aware comparison of two vectors
.checkGitConfig

Check global git config file
cropInputs

Crop a Spatial* or Raster* object
cloudWriteOld

Basic tool for using cloud-based caching
fixErrors

Do some minor error fixing
retry

A wrapper around try that retries on failure
getGDALVersion

Check the GDAL version in use
makeMemoisable

Generic method to make or unmake objects memoisable
dlGoogle

Download file from Google Drive
pkgSnapshot

Take a snapshot of all the packages and version numbers
dlGeneric

Download file from generic source url
postProcess

Generic function to post process objects
.digest

Calculate the hashes of multiple files
.robustDigest

Create reproducible digests of objects in R
searchFull

Search up the full scope for functions
.installPackages

Internal function to install packages
.pkgEnv

The reproducible package environment
.listFilesInArchive

List files in either a .zip or or .tar file
.sortDotsUnderscoreFirst

Sort or order any named object with dotted names and underscores first
linkOrCopy

Hardlink, symlink, or copy a file
objSize

Recursive object.size
isWindows

Test whether system is Windows
pipe

A cache-aware pipe that does not mask with %>%
installVersions

Install exact package versions from a package version text file & GitHub
pkgDep

Determine package dependencies, first looking at local filesystem
.setSubAttrInList

Set subattributes within a list by reference
.formalsNotInCurrentDots

Identify which formals to a function are not in the current ...
.getTargetCRS

Hierarchically get crs from Raster*, Spatial*
.tagsByClass

Add extra tags to an archive based on class
unrarPath

The known path for unrar or 7z
writeFuture

Write to archivist repository, using future::future
writeOutputs

Write module inputs on disk
clearCache

Examining and modifying the cache
projectInputs

Project Raster* or Spatial* or sf objects
.purge

Purge individual line items from checksums file
reproducibleOptions

reproducible options
package_dependenciesMem

Memoised version of package_dependencies
reproducible-package

The reproducible package
prepInputs

Download and optionally post process files
.prefix

Add a prefix or suffix to the basename part of a file path
tempdir2

Make a temporary sub-directory
testForArchiveExtract

Returns unrar path and creates a shortcut as .unrarPath Was not incorporated in previous function so it can be used in the tests
.addChangedAttr

Add an attribute to an object indicating which named elements change
CacheDBFile

A collection of low level tools for Cache
Copy

Recursive copying of nested environments, and other "hard to copy" objects
.addTagsToOutput

Add tags to object
Path-class

Coerce a character string to a class "Path"
Checksums

Calculate checksum
cloudCache

Deprecated
CacheDigest

The exact digest function that Cache uses
Require

Repeatability-safe install and load packages, optionally with specific versions