Enhance Reproducibility of R Code
Change the absolute path of a file
Recursive copying of nested environments, and other "hard to copy" obj...
Assess the appropriate raster layer data type
A version of base::basename
that is NULL
resistant
Saves a wide variety function call outputs to disk and optionally RAM,...
The exact digest function that Cache
uses
Cache-like function for spatial domains
Low-level functions to create and work with a cache
Check for presence of checkFolderID
(for Cache(useCloud)
)
Check directory path
Keep original geometries of sf
objects
Add a prefix or suffix to the basename part of a file path
Make a temporary (sub-)directory
Make a temporary file in a temporary (sub-)directory
Get min or maximum value of a (Spat)Raster
Returns unrar path and creates a shortcut as .unrarPath Was not incorp...
The known path for unrar or 7z
Examining and modifying the cache
Write to cache repository, using future::future
Get a unique name for a given study area
Tests if unrar or 7zip exist
Exported generics and methods
An alternative to basename
and dirname
when there are sub-folders
Calculate checksum
Download from cloud, if necessary
Upload a file to cloud directly from local cachePath
NA
-aware comparison of two vectors
Extract files from archive
Copy a file using robocopy
on Windows and rsync
on Linux/macOS
Attach debug info to return for Cache
Crop a Spatial*
or Raster*
object
Determine filename, either automatically or manually
Calculate the hashes of multiple files
Download file from generic source url
Alternative to interactive()
for unit testing
Download file from Google Drive
Move a file to a new location -- Defunct -- use hardLinkOrCopy
Identify which formals to a function are not in the current ...
Evaluate whether a cacheId is memoised
Remove attributes that are highly varying
Provide standard messaging for missing package dependencies
Deal with class for saving to and loading from Cache or Disk
A wrapper around a set of downloading functions
Download a remote file
Faster operations on rasters (DEPRECATED because terra::mask
is fast...
Return the filename(s) from a Raster*
object
Fix common errors in GIS layers, using terra
3-Step postProcess sequence for SpatRasters using gdalwarp
Grep system calls
Try to pick a file to load
Checks for existed of a url or the internet using [https://CRAN.R-proj...
Has a cached object has been updated?
Test whether system is Windows
Hardlink, symlink, or copy a file
List files in either a .zip
or or .tar
file
Create a list with names from object names
Load a file from the cache
Merge two cache repositories together
Use message
with a consistent use of verbose
Deal with moved cache issues
Normalize file paths
Wrapper around lobstr::obj_size
Convert numeric to character with padding
Coerce a character string to a class "Path"
The reproducible
package environments
Generic function to post process objects
Transform a GIS dataset so it has the properties (extent, projection, ...
Copy the file-backing of a file-backed Raster* object
Download and optionally post-process files
Download, checksum, extract files
Purge individual line items from checksums file
A helper to getOption("reproducible.rasterRead")
Relative paths
Remap file names
The reproducible
package
reproducible
options
A wrapper around try
that retries on failure
Create reproducible digests of objects in R
Save an object to Cache
Search up the full scope for functions
Set seed with a random value using Sys.time()
Set subattributes within a list by reference
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().
Useful links