reproducible2.1.0 package

Enhance Reproducibility of R Code

postProcessTo

Transform a GIS dataset so it has the properties (extent, projection, ...

studyAreaName

Get a unique name for a given study area

tempdir2

Make a temporary (sub-)directory

tempfile2

Make a temporary file in a temporary (sub-)directory

remapFilenames

Remap file names

Cache

Saves a wide variety function call outputs to disk and optionally RAM,...

exportedMethods

Exported generics and methods

reproducible-package

The reproducible package

reproducibleOptions

reproducible options

archiveExtractBinary

Tests if unrar or 7zip exist

assessDataType

Assess the appropriate raster layer data type

basename2

A version of base::basename that is NULL resistant

CacheDigest

The exact digest function that Cache uses

CacheGeo

Cache-like function for spatial domains

CacheHelpers

Low-level functions to create and work with a cache

checkAndMakeCloudFolderID

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

checkPath

Check directory path

checkRelative

An alternative to basename and dirname when there are sub-folders

Checksums

Calculate checksum

cloudDownload

Download from cloud, if necessary

cloudUploadFromCache

Upload a file to cloud directly from local cachePath

compareNA

NA-aware comparison of two vectors

convertPaths

Change the absolute path of a file

Copy

Recursive copying of nested environments, and other "hard to copy" obj...

extractFromArchive

Extract files from archive

copyFile

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

debugCache

Attach debug info to return for Cache

deprecated

Crop a Spatial* or Raster* object

determineFilename

Determine filename, either automatically or manually

digest

Calculate the hashes of multiple files

dlGeneric

Download file from generic source url

isInteractive

Alternative to interactive() for unit testing

dlGoogle

Download file from Google Drive

dot-file.move

Move a file to a new location -- Defunct -- use hardLinkOrCopy

dot-formalsNotInCurrentDots

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

dot-isMemoised

Evaluate whether a cacheId is memoised

dot-removeCacheAtts

Remove attributes that are highly varying

dot-requireNamespace

Provide standard messaging for missing package dependencies

dotWrap

Deal with class for saving to and loading from Cache or Disk

downloadFile

A wrapper around a set of downloading functions

downloadRemote

Download a remote file

fastMask

Faster operations on rasters (DEPRECATED because terra::mask is fast...

Filenames

Return the filename(s) from a Raster* object

fixErrorsIn

Fix common errors in GIS layers, using terra

gdalwarpFns

3-Step postProcess sequence for SpatRasters using gdalwarp

grepSysCalls

Grep system calls

guessAtTarget

Try to pick a file to load

internetExists

Checks for existed of a url or the internet using [https://CRAN.R-proj...

isUpdated

Has a cached object has been updated?

isWindows

Test whether system is Windows

keepOrigGeom

Keep original geometries of sf objects

linkOrCopy

Hardlink, symlink, or copy a file

listFilesInArchive

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

listNamed

Create a list with names from object names

loadFile

Load a file from the cache

mergeCache

Merge two cache repositories together

pkgEnv

The reproducible package environments

postProcess

Generic function to post process objects

messageColoured

Use message with a consistent use of verbose

movedCache

Deal with moved cache issues

normPath

Normalize file paths

objSize

Wrapper around lobstr::obj_size

paddedFloatToChar

Convert numeric to character with padding

Path-class

Coerce a character string to a class "Path"

prefix

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

prepareFileBackedRaster

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

prepInputs

Download and optionally post-process files

preProcess

Download, Checksum, Extract files

purge

Purge individual line items from checksums file

rasterRead

A helper to getOption("reproducible.rasterRead")

relativePaths

Relative paths

retry

A wrapper around try that retries on failure

robustDigest

Create reproducible digests of objects in R

saveToCache

Save an object to Cache

search

Search up the full scope for functions

set.randomseed

Set seed with a random value using Sys.time()

setSubAttrInList

Set subattributes within a list by reference

terra-migration

Get min or maximum value of a (Spat)Raster

testForArchiveExtract

Returns unrar path and creates a shortcut as .unrarPath Was not incorp...

unrarPath

The known path for unrar or 7z

viewCache

Examining and modifying the cache

writeFuture

Write to cache repository, using future::future

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 has 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().

  • Maintainer: Eliot J B McIntire
  • License: GPL-3
  • Last published: 2024-05-30