Package: reproducible 3.2.1.9089

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.2.1.9089.tar.gz
reproducible_3.2.1.9089.zip(r-4.7-any)reproducible_3.2.1.9089.zip(r-4.6-any)reproducible_3.2.1.9089.zip(r-4.5-any)
reproducible_3.2.1.9089.tgz(r-4.6-any)reproducible_3.2.1.9089.tgz(r-4.5-any)
reproducible_3.2.1.9089.tar.gz(r-4.7-any)reproducible_3.2.1.9089.tar.gz(r-4.6-any)
reproducible_3.2.1.9089.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
reproducible/json (API)

# 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

9.51 score 39 stars 14 packages 1.2k downloads 1 mentions 142 exports 12 dependencies

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

TargetResultTimeFilesSyslog
linux-develOK191
source / vignettesOK232
linux-releaseOK228
macos-releaseOK591
macos-oldrelOK252
windows-develOK570
windows-releaseOK838
windows-oldrelOK491
wasm-releaseOK114

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

Dependencies:clicpp11crayondata.tabledigestfilelockfpComparefslifecyclelobstrprettyunitsrlang

Listing the external data a project uses
The ledger of a session | The ledger and Cache() | In a SpaDES project | Data read by other means | Running a project without internet

Last update: 2026-11-17
Started: 2026-11-17

Introduction to Cache
Sharing a ledger of spatial results through Google Drive | Reproducible workflow | Differences with other approaches | Function-level caching | Caching examples | Basic use | Example 1: Basic cache use with tags | Example 2: using the "accessed" tag | Example 3: using keepCache | Example 4: searching for multiple objects in the cache | Example 5: using caching to speed up rerunning expensive computations | Nested Caching | cacheId | Working with the Cache manually | Alternative database backends

Last update: 2026-10-07
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
Deal with class for saving to and loading from Cache or Disk.filebackedPath .unwrap .unwrap.data.table .unwrap.default .unwrap.environment .unwrap.list .unwrap.PackedSpatExtent2 .unwrap.PackedSpatVector .unwrap.PackedSpatVector2 .wrap .wrap.default .wrap.environment .wrap.list
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
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
A ledger of spatial rows, shared through a folder or Google DriveCacheGeo CacheGeoLedger CacheGeoPush CacheGeoRead CacheGeoWrite
Extract the cache id of an objectcacheId
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
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
List the files under given folders that an R script opensfilesUsedTrace
Fix common errors in GIS layers, using 'terra'fixErrorsIn
Forget what 'whyNoCacheHit()' has read from a repository this sessionforgetCacheLookups
3-Step postProcess sequence for SpatRasters using 'gdalwarp'gdalMask gdalProject gdalResample
Relative pathsgetRelative makeRelative
Harmonize all forms of callharmonizeCall
Is an error a failure to reach the server?isConnectionError
Has a cached object has been updated?isUpdated
Keep original geometries of 'sf' objectskeepOrigGeom
Hardlink, symlink, or copy a filelinkOrCopy
List a Google Drive folder, using a mirror listing when remappedlistGoogleDriveFolder
Create a list with names from object nameslistNamed
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
Pad a pair of start and end years to a common widthpadYears
Coerce a character string to a class "Path"asPath asPath.character asPath.NULL coerce,character,Path-method Path-class
Generic function to post process objectspostProcess postProcess.default postProcess.list
Superseded 'postProcess' input functionscropInputs cropInputs.default maskInputs maskInputs.default postProcessInputsSuperseded projectInputs projectInputs.default
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
The download ledger: a record of the data a run read from outsideclearUrlLog logUrlAccess 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
Check downloaded files against their remote sourcespreProcessCheckURLs
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
The URL ledger kept in a cacheurlLog urlLog.default
Does an object use a pointer?usesPointer
Why did this call not reuse the cache, and what changed?print.cacheDryRun print.whyNoCacheHit whyNoCacheHit
Report on the next cache miss that looks accidental, oncewhyNoCacheHitOnce
Write to cache repository, using 'future::future' (defunct)writeFuture