sn_set_data_folder: Set folder for db data

View source: R/db.R

sn_set_data_folderR Documentation

Set folder for db data

Description

Consider using a folder out of your current project directory, e.g. 'sn_set_data_folder("~/R/sn_data/")': you will be able to use the same cache in different projects, and prevent cached files from being sync-ed if you use services such as Nextcloud or Dropbox.

Usage

sn_set_data_folder(path = NULL)

sn_get_data_folder(path = NULL)

Arguments

path

A path to a location used for caching data. If the folder does not exist, it will be created.

Value

The path to the caching folder, if previously set; the same path as given to the function; or the default, 'sn_data' is none is given.

Examples


if (interactive()) {
  sn_set_data_folder(fs::path(fs::path_home_r(), "R", "sn_data"))
}

sn_get_data_folder()

giocomai/streetnamer documentation built on Oct. 14, 2023, 6:27 p.m.