set_data_roots: Set the file system locations where data are stored

View source: R/file_roots.R

set_data_rootsR Documentation

Set the file system locations where data are stored

Description

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.

Usage

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

## Not run: 
## 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

## End(Not run)


AustralianAntarcticDivision/raadtools documentation built on Nov. 14, 2024, 4:27 p.m.