Package: reproducible 3.1.1.9035

Eliot J B McIntire

reproducible: Enhance Reproducibility of R Code

A collection of high-level, machine- and OS-independent tools for making reproducible and reusable content in R. The two workhorse functions are 'Cache()' and 'prepInputs()'. 'Cache()' allows for nested caching, is robust to environments and objects with environments (like functions), and deals with some classes of file-backed R objects e.g., from 'terra' and 'raster' packages. Both functions have been developed to be foundational components of data retrieval and processing in continuous workflow situations. In both functions, efforts are made to make the first and subsequent calls of functions have the same result, but faster at subsequent times by way of checksums and digesting. Several features are still under development, including cloud storage of cached objects allowing for sharing between users. Several advanced options are available, see '?reproducibleOptions()'.

Authors:Eliot J B McIntire [aut, cre], Alex M Chubaty [aut], Tati Micheletti [ctb], Ceres Barros [ctb], Ian Eddy [ctb], His Majesty the King in Right of Canada, as represented by the Minister of Natural Resources Canada [cph]

reproducible_3.1.1.9035.tar.gz
reproducible_3.1.1.9035.zip(r-4.7)reproducible_3.1.1.9035.zip(r-4.6)reproducible_3.1.1.9035.zip(r-4.5)
reproducible_3.1.1.9035.tgz(r-4.6-any)reproducible_3.1.1.9035.tgz(r-4.5-any)
reproducible_3.1.1.9035.tar.gz(r-4.7-any)reproducible_3.1.1.9035.tar.gz(r-4.6-any)
reproducible_3.1.1.9035.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
reproducible/json (API)
NEWS

# Install 'reproducible' in R:
install.packages('reproducible', repos = c('https://predictiveecology.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/predictiveecology/reproducible/issues

Pkgdown/docs site:https://reproducible.predictiveecology.org

On CRAN:

Conda:

reproducibilityreproducible-research

10.13 score 39 stars 15 packages 110 scripts 2.5k downloads 1 mentions 131 exports 11 dependencies

Last updated from:aa4a8a78a0 (on development). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK229
source / vignettesOK224
linux-release-x86_64OK230
macos-release-arm64OK170
macos-oldrel-arm64OK169
windows-develOK195
windows-releaseOK199
windows-oldrelOK197
wasm-releaseOK129

Exports:.addChangedAttr.addTagsRepo.addTagsToOutput.cacheMessage.cacheMessageObjectToRetrieve.checkCacheRepo.file.move.formalsNotInCurrentDots.grepSysCalls.isCRSany.isGridded.isMemoised.isSF.isSpat.isSpatialAny.isVector.objSizeWithTry.orderDotsUnderscoreFirst.preDigestByClass.prefix.prepareOutput.requireNamespace.robustDigest.setSubAttrInList.sortDotsUnderscoreFirst.suffix.tagsByClass.unwrap.updateTagsRepo.whereInStack.wrapasPathassessDataTypebasename2CacheCacheDBFileCacheDBTableNameCacheDigestCacheGeocacheIdCacheIsACacheCacheStorageDirCacheStoredFileCacheV2cccheckAndMakeCloudFolderIDcheckPathChecksumsclearCacheclearUrlLogcompareNAconvertPathsconvertRasterPathsCopycopyFilecreateCachecropInputscropTodataType2detectActiveCoresdownloadFileextractFromCacheFilenamesfixErrorsfixErrorsIngdalMaskgdalProjectgdalResamplegetRelativeinternetExistsisUpdatedkeepCachelinkOrCopylistNamedloadFileloadFromCachemakeMemoisablemakeRelativemakeUrlRemapmaskInputsmaskTomaxFnmergeCachemessageCachemessageColouredmessageDFmessagePrepInputsmessagePreProcessmessageQuestionminFnmovedCachenlayers2normPathnormPathRelnumCoresToUseobjSizeobjSizeSessionpaddedFloatToCharpostProcesspostProcessTerrapostProcessToprepInputsprepInputsCOGprepInputsLogprepInputsWithTilesprepopulateCacheAsyncpreProcesspreProcessParamsprojectInputsprojectTopurgeChecksumsrasterReadremapFilenamesreproducibleOptionsretryrmFromCachesearchFullsearchFullExset.randomseedshowCachestudyAreaNametempdir2tempfile2unmakeMemoisableupdateFilenameSlotsurlExistsusesPointervalues2writeFuturewriteOutputswriteTo

Dependencies:clicpp11crayondata.tabledigestfilelockfpComparefslobstrprettyunitsrlang

Introduction to Cache

Rendered fromIntro-to-Cache.Rmdusingknitr::rmarkdownon Jun 02 2026.

Last update: 2026-05-15
Started: 2018-06-14

Readme and manuals

Help Manual

Help pageTopics
The 'reproducible' packagereproducible-package reproducible
Add a Tag to a Cached Object in the Repository.addTagsRepo .updateTagsRepo
Attach debug info to return for Cache.debugCache
Move a file to a new location - Defunct - use 'hardLinkOrCopy'.file.move
Some spatial helper functions.isCRSany .isGridded .isSF .isSpat .isSpatialAny .isVector isSpatial
Evaluate whether a cacheId is memoised.isMemoised
'lobstr::obj_size' with a 'try' to address issue #72.objSizeWithTry
Add a prefix or suffix to the basename part of a file path.prefix .suffix suffix
Copy the file-backing of a file-backed Raster* object.prepareFileBackedRaster
Remove attributes that are highly varying.removeCacheAtts
Provide standard messaging for missing package dependencies.requireNamespace
Set subattributes within a list by reference.setSubAttrInList
Search for objects in the call stack.whereInStack
Deal with class for saving to and loading from Cache or Disk.unwrap .unwrap.data.table .unwrap.default .unwrap.environment .unwrap.list .unwrap.PackedSpatExtent2 .unwrap.PackedSpatVector .unwrap.PackedSpatVector2 .wrap .wrap.default .wrap.environment .wrap.list
Assess the appropriate raster layer data typeassessDataType assessDataType.default
A version of 'base::basename' that is 'NULL' resistantbasename2
Saves a wide variety function call outputs to disk and optionally RAM, for recovery laterCache cache2 CacheV2
The exact digest function that 'Cache' usesCacheDigest
Cache-like function for spatial domainsCacheGeo
Extract the cache id of an objectcacheId
Check for presence of 'checkFolderID' (for 'Cache(useCloud)')checkAndMakeCloudFolderID
Check directory pathcheckPath checkPath,character,logical-method checkPath,character,missing-method checkPath,missing,ANY-method checkPath,NULL,ANY-method
An alternative to 'basename' and 'dirname' when there are sub-folderscheckRelative
Calculate checksumChecksums Checksums,character,logical-method Checksums,character,missing-method
Download from cloud, if necessarycloudDownload
'NA'-aware comparison of two vectorscompareNA
Convert all ways of calling a function into canonical form, including defaultsconvertCallToCommonFormat
Change the absolute path of a fileconvertPaths convertRasterPaths
Recursive copying of nested environments, and other "hard to copy" objectsCopy Copy,ANY-method Copy,data.frame-method Copy,data.table-method Copy,list-method Copy,refClass-method
Copy a file using 'robocopy' on Windows and 'rsync' on Linux/macOScopyFile copySingleFile
Low-level functions to create and work with a cacheCacheDBFile CacheDBTableName CacheIsACache CacheStorageDir CacheStoredFile createCache extractFromCache loadFromCache rmFromCache
Count Active Threads Based on CPU UsagedetectActiveCores
Determine filename, either automatically or manuallydetermineFilename
A wrapper around a set of downloading functionsdownloadFile
Download a remote filedownloadRemote
Extract files from archiveextractFromArchive
Return the filename(s) from a Raster* objectFilenames Filenames,ANY-method Filenames,data.table-method Filenames,environment-method Filenames,list-method Filenames,Path-method
Fix common errors in GIS layers, using 'terra'fixErrorsIn
3-Step postProcess sequence for SpatRasters using 'gdalwarp'gdalMask gdalProject gdalResample
Relative pathsgetRelative makeRelative
Harmonize all forms of callharmonizeCall
Checks for existed of a url or the internet using <https://CRAN.R-project.org>internetExists urlExists
Has a cached object has been updated?isUpdated
Keep original geometries of 'sf' objectskeepOrigGeom
Hardlink, symlink, or copy a filelinkOrCopy
Create a list with names from object nameslistNamed
Load a file from the cacheloadFile
Build a URL remap function from a manifestmakeUrlRemap
Remove 'quote' and determine if call uses '...'matchCall2
Merge two cache repositories togethermergeCache mergeCache,ANY-method
Use 'message' with a consistent use of 'verbose'.messageFunctionFn messageCache messageColoured messageDF messagePrepInputs messagePreProcess messageQuestion
Get min or maximum value of a (Spat)RasterdataType2 maxFn minFn nlayers2 values2
Deal with moved cache issuesmovedCache
Normalize file pathsnormPath normPath,character-method normPath,list-method normPath,logical-method normPath,missing-method normPath,NULL-method normPathRel
Estimate Number of CPU Cores to Use for Parallel ProcessingnumCoresToUse
Wrapper around 'lobstr::obj_size'objSize objSizeSession
Convert numeric to character with paddingpaddedFloatToChar
Coerce a character string to a class "Path"asPath asPath.character asPath.null Path-class
Generic function to post process objectspostProcess postProcess.default postProcess.list
Transform a GIS dataset so it has the properties (extent, projection, mask) of anothercropTo maskTo postProcessTerra postProcessTo projectTo writeTo
Download and optionally post-process filesprepInputs
Fast spatial subsetting of Cloud Optimized GeoTiff (COG) filesprepInputsCOG
URL access log for 'prepInputs' / 'preProcess'clearUrlLog prepInputsLog
Alternative to 'prepInputs' that can use Spatial Tiles stored locally or on Google DriveprepInputsWithTiles
Pre-populate the in-memory 'showCache' cache for a given 'cachePath'prepopulateCacheAsync
Download, checksum, extract filespreProcess preProcessParams
Purge the checksums of a single filepurgeChecksums
A helper to 'getOption("reproducible.rasterRead")'rasterRead
Remap file namesremapFilenames
'reproducible' optionsreproducibleOptions
A wrapper around 'try' that retries on failureretry
Save an object to CachesaveToCache
Search up the full scope for functionssearchFull searchFullEx
Set seed with a random value using Sys.time()set.randomseed
Examining and modifying the cachecc clearCache clearCache,ANY-method keepCache keepCache,ANY-method showCache showCache,ANY-method
Get a unique name for a given study areastudyAreaName studyAreaName,ANY-method studyAreaName,character-method
Make a temporary (sub-)directorytempdir2
Make a temporary file in a temporary (sub-)directorytempfile2
The known path for unrar or 7z.systemArchivePath unrarPath
Does an object use a pointer?usesPointer
Write to cache repository, using 'future::future'writeFuture