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

1,334

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Eliot J B

Last Published

May 15th, 2020

Functions in reproducible (1.1.0)

cloudCache

Deprecated
Path-class

Coerce a character string to a class "Path"
Checksums

Calculate checksum
Copy

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

A collection of low level tools for Cache
.addChangedAttr

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

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

The exact digest function that Cache uses
Filenames

Return the filename(s) from a Raster* object
.addTagsToOutput

Add tags to object
assessDataTypeGDAL

Assess the appropriate raster layer data type for GDAL
getUserTags

Cache helpers
basename2

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

Download from cloud, if necessary
cloudCheckOld

Basic tool for using cloud-based caching
checkoutVersion

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

Create a new cache
.cacheMessage

Create a custom cache message by class
clearStubArtifacts

Clear erroneous archivist artifacts
Cache

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

Attach debug info to return for Cache
archiveExtractBinary

Tests if unrar or 7zip exist
compareNA

NA-aware comparison of two vectors
getFunctionName

A set of helpers for Cache
assessDataType

Assess the appropriate raster layer data type
dlGeneric

Download file from generic source url
makeMemoisable

Generic method to make or unmake objects memoisable
linkOrCopy

Hardlink, symlink, or copy a file
convertPaths

Change the absolute path of a file
checkAndMakeCloudFolderID

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

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

Check directory path
maskInputs

Mask module inputs
.checkGitConfig

Check global git config file
copySingleFile

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

Calculate the hashes of multiple files
.checkCacheRepo

Check for cache repository info in ...
cloudWriteOld

Basic tool for using cloud-based caching
.formalsNotInCurrentDots

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

Take a snapshot of all the packages and version numbers
mergeCache

Merge two cache repositories together
fastMask

Faster operations on rasters
determineFilename

Determine filename, either automatically or manually
.installPackages

Internal function to install packages
cloudUploadFromCache

Upload a file to cloud directly from local cacheRepo
guessAtTarget

Try to pick a file to load
dlGoogle

Download file from Google Drive
postProcess

Generic function to post process objects
movedCache

Deal with moved cache issues
.getTargetCRS

Hierarchically get crs from Raster*, Spatial*
writeOutputs

Write module inputs on disk
writeFuture

Write to cache repository, using future::future
reproducible-package

The reproducible package
.preDigestByClass

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

Purge individual line items from checksums file
fixErrors

Do some minor error fixing
searchFull

Search up the full scope for functions
cropInputs

Crop a Spatial* or Raster* object
.robustDigest

Create reproducible digests of objects in R
available.packagesMem

Memoised version of available.packages
installVersions

Install exact package versions from a package version text file & GitHub
.setSubAttrInList

Set subattributes within a list by reference
pkgDep

Determine package dependencies, first looking at local filesystem
.prepareFileBackedRaster

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

Download and optionally post-process files
installedVersions

Determine versions all installed packages
.pkgEnv

The reproducible package environment
downloadFile

A wrapper around a set of downloading functions
checkGDALVersion

Check whether the system has a minimum version of GDAL available
cloudSyncCacheOld

Sync cloud with local Cache
.checkForAuxiliaryFiles

Check a neededFile for commonly needed auxiliary files
extractFromArchive

Extract files from archive
getGDALVersion

Check the GDAL version in use
newLibPaths

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

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

Make a temporary sub-directory or file in that subdirectory
testForArchiveExtract

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

Grep system calls
normPath

Normalize filepath
cloudUpload

Upload to cloud, if necessary
.removeCacheAtts

Remove attributes that are highly varying
preProcess

Download, Checksum, Extract files
.prefix

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

reproducible options
retry

A wrapper around try that retries on failure
unrarPath

The known path for unrar or 7z
clearCache

Examining and modifying the cache
isInteractive

Alternative to interactive() for unit testing
.requireNamespace

Provide standard messaging for missing package dependencies
objSize

Recursive object.size
isWindows

Test whether system is Windows
pipe

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

Make any modifications to object recovered from cacheRepo
projectInputs

Project Raster* or Spatial* or sf objects
studyAreaName

Get a unique name for a given study area
.tagsByClass

Add extra tags to an archive based on class