These provide top-level, powerful settings for a comprehensive reproducible workflow. To see defaults, run reproducibleOptions(). See Details below.

reproducibleOptions()

Details

Below are options that can be set with options("reproducible.xxx" = newValue), where xxx is one of the values below, and newValue is a new value to give the option. Sometimes these options can be placed in the user's .Rprofile file so they persist between sessions.

The following options are likely of interest to most users

OPTION
DEFAULT VALUE
DESCRIPTION
ask
TRUEUsed in
clearCacheand
keepCache
cachePath
.reproducibleTempCacheDir
Used inCache
and many others.The default path for repositories if not passed as an argument.
destinationPath
NULL
Used inprepInputs,
preProcess. Can be set globally here.
futurePlan
FALSE
On Linux OSs,Cache
andcloudCache
have some functionality that uses thefuturepackage.
Default is to not use these, as they are experimental. They may,however, be very effective in speeding up some things, specifically,uploading cached elements via googledrive in
cloudCache
inputPaths
NULL
Used inprepInputs,
preProcess. If set to a path, this
will cause these functions to save their downloadedand preprocessed file to this location, with a hardlink(via
file.link) to the filecreated in the
destinationPath. This can be usedso that individual projects that use common data sets
can maintain modularity (by placing downloaded objectsin theirdestinationPath
, but also minimizere-downloading the same (perhaps large) file over and overfor each project. Because the files are hardlinks, there
is no extra space taken up by the apparently duplicated files
inputPathsRecursive
FALSEUsed in
prepInputs,
preProcess. Should thereproducible.inputPaths
be searched recursively for existence of a file
overwrite
FALSE
Used inprepInputs,
preProcess,
downloadFile, andpostProcess
.
quick
FALSEUsed in
Cache. This will cause
Cacheto usefile.size(file)
instead of thedigest::digest(file)
.Less robust to changes, but faster. NOTE: this will only affect objectson disk.
useCache
TRUE
Used inCache
. IfFALSE, then
the entireCachemachinery is skipped and the functions
are run as if there was no Cache occurring. Can also take 2 other values:'overwrite'
and'devMode'.
'overwrite'willcause no recovery of objects from the cache repository, only new
ones will be created. If the hash is identical to a previous one,then this will overwrite the previous one.'devMode'
willfunction as normallyCache
except it will use theuserTags
to determine if a previous function has been run. If theuserTags
are identical, but the digest value is different, the old value willbe deleted from the cache repository and this new value will be added.This addresses a common situation during the development stage: functions
are changing frequently, so any entry in the cache repository willbe stale following changes to functions, i.e., they will likely neverbe relevant again. This will therefore keep the cache repository
clean of stale objects. If there is ambiguity in theuserTags, i.e
they do not uniquely identify a single entry in the cacheRepo, thenthis option will default back to the non devMode behaviour to avoiddeleting objects. This, therefore, is most useful if the user is
using unique values foruserTags
useMemoise
TRUE
Used inCache
. IfTRUE,
recovery of cached elements from the cacheRepo will usememoise::memoise
. This means that the 3rd time running a functionwill be much faster than the 1st (create cache entry) or 2nd (recoverfrom the SQLite database on dist). NOTE: memoised values are removed
when the R session is restarted.This option will use more RAMand
so may need to be turned off if RAM is limiting.clearCache
of any sort will cause all memoising to be 'forgotten'(memoise::forget
)
useNewDigestAlgorithm
TRUEThis will mean that previous
cache repositorieswill be defunct. This new algorithm will makeCache
lesssensitive to minor but irrelevant changes (like changing theorder of arguments) and will work successfully across operating
systems (especially relevant for the new 'cloudCache' function
verbose
FALSEIf set to
TRUEthen every Cachecall will show a summary of the objects being cached, their
object.sizeand the time it took to digest them and also the time it took to run
the call and save the call to the cache repository or load the cachedcopy from the repository. This may help diagnosing some problems that may occur.

Advanced

The following options are likely not needed by a user.

cloudChecksumsFilename
file.path(dirname(.reproducibleTempCacheDir), "checksums.rds")
Used in
cloudCache
length
Inf
Used inCache, specifically to the internal
calls toCacheDigest. This is passed to
digest::digest.Mostly this would be changed from default
Infif the digesting istaking too long. Use this with caution, as some objects will have MANY
NA values in their first MANY elements
useragent
"http://github.com/PredictiveEcology/reproducible"
User agent for downloads using this package.