Functions that set and get a session-wide archive directory that can be used by all getSpatialData functions.

set_archive(dir_archive, create = T)

get_archive()

Arguments

dir_archive

character, directory to the getSpatialData archive folder.

create

logical, whether to create directory, if not existing or not.

Details

set_archive defines the session directory on your machine (or an external device) where getSpatialData should build up its donwload data archive. Since getSpatialData handles big amounts of data, it is recommended to once define a location where enough free storage is available and then afterwards to not change the archive location. You need to define the archives location for each session after loading getSpatialData. It will then be remembered for the duration of the session. Apart from the archive location, you can manually define a download path when calling the *_data functions. If you do not define a path there, getSpatialData will direct the download to the defined archive. The archive is structred by sensors.

get_archive returns the currently defined archive directory.

See also

get_data get_previews

Examples

## set archive directory
dir.arc <- tempdir()
set_archive(dir.arc)

## return current archive directory
get_archive()