This is a convenience wrapper around the corresponding admin functions in the raadfiles package, so that most users will not need to use those functions directly. This function tells raadtools where to look for its data files, (by default) will build the necessary file list cache if it does not exist, and loads that cache into memory so that raadtools can use it.

set_data_roots(..., build_cache_if_missing = TRUE, refresh_cache = FALSE)

get_data_roots()

Arguments

...

strings: one or more paths to directories containing data

build_cache_if_missing

logical: raadtools maintains a cache that lists all of files in each data collection. If build_cache_if_missing is TRUE, a cache will be built if it does not exist

refresh_cache

logical: for each path, should the file collection be re-scanned and the cache rebuilt? (May be slow)

Value

TRUE (invisibly) on success

Examples

if (FALSE) {
## assume that we have downloaded some data files to c:/my/data
library(raadtools)
set_data_roots("c:/my/data")
## see the README/vignette for more detail
}