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,998

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Eliot J B

Last Published

May 20th, 2020

Functions in reproducible (1.1.1)

CacheDigest

The exact digest function that Cache uses
Checksums

Calculate checksum
Copy

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

Deprecated
.addChangedAttr

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

A collection of low level tools for Cache
Filenames

Return the filename(s) from a Raster* object
Path-class

Coerce a character string to a class "Path"
.addTagsToOutput

Add tags to object
Require

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

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

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

Clear erroneous archivist artifacts
getUserTags

Cache helpers
Cache

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

Assess the appropriate raster layer data type
cloudDownload

Download from cloud, if necessary
compareNA

NA-aware comparison of two vectors
cloudCheckOld

Basic tool for using cloud-based caching
archiveExtractBinary

Tests if unrar or 7zip exist
convertPaths

Change the absolute path of a file
cloudSyncCacheOld

Sync cloud with local Cache
copySingleFile

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

Assess the appropriate raster layer data type for GDAL
available.packagesMem

Memoised version of available.packages
cropInputs

Crop a Spatial* or Raster* object
newLibPaths

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

Try to pick a file to load
.installPackages

Internal function to install packages
cloudUpload

Upload to cloud, if necessary
normPath

Normalize filepath
projectInputs

Project Raster* or Spatial* or sf objects
.prepareOutput

Make any modifications to object recovered from cacheRepo
dlGoogle

Download file from Google Drive
studyAreaName

Get a unique name for a given study area
.digest

Calculate the hashes of multiple files
dlGeneric

Download file from generic source url
.removeCacheAtts

Remove attributes that are highly varying
.tagsByClass

Add extra tags to an archive based on class
createCache

Create a new cache
checkPath

Check directory path
.cacheMessage

Create a custom cache message by class
cloudUploadFromCache

Upload a file to cloud directly from local cacheRepo
.requireNamespace

Provide standard messaging for missing package dependencies
.checkGitConfig

Check global git config file
checkAndMakeCloudFolderID

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

Check for cache repository info in ...
.formalsNotInCurrentDots

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

Attach debug info to return for Cache
cloudWriteOld

Basic tool for using cloud-based caching
linkOrCopy

Hardlink, symlink, or copy a file
makeMemoisable

Generic method to make or unmake objects memoisable
maskInputs

Mask module inputs
preProcess

Download, Checksum, Extract files
.listFilesInArchive

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

Determine filename, either automatically or manually
getGDALVersion

Check the GDAL version in use
downloadFile

A wrapper around a set of downloading functions
getFunctionName

A set of helpers for Cache
extractFromArchive

Extract files from archive
pkgSnapshot

Take a snapshot of all the packages and version numbers
.grepSysCalls

Grep system calls
fastMask

Faster operations on rasters
checkGDALVersion

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

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

Determine versions all installed packages
.checkForAuxiliaryFiles

Check a neededFile for commonly needed auxiliary files
isInteractive

Alternative to interactive() for unit testing
.prefix

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

Search up the full scope for functions
fixErrors

Do some minor error fixing
objSize

Recursive object.size
pipe

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

Create reproducible digests of objects in R
.sortDotsUnderscoreFirst

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

Set subattributes within a list by reference
movedCache

Deal with moved cache issues
mergeCache

Merge two cache repositories together
postProcess

Generic function to post process objects
tempdir2

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

Test whether system is Windows
prepInputs

Download and optionally post-process files
.prepareFileBackedRaster

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

Determine package dependencies, first looking at local filesystem
reproducible-package

The reproducible package
unrarPath

The known path for unrar or 7z
.purge

Purge individual line items from checksums file
.preDigestByClass

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

The reproducible package environment
clearCache

Examining and modifying the cache
reproducibleOptions

reproducible options
writeFuture

Write to cache repository, using future::future
retry

A wrapper around try that retries on failure
testForArchiveExtract

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

Write module inputs on disk
.getTargetCRS

Hierarchically get crs from Raster*, Spatial*