Set key project parameters that determine the folder used for storing project files
Source:R/cas_options.R
cas_set_options.Rd
Your project folder can be anywhwere on your file system. Considering that
this is where possibly a very large number of html files will be downloaded,
it is usually preferrable to choose a location that is not included in live
backups. These settings determine the names given to these hierarchical
folders: website
folder will be under project
folder which will be under
the base_folder
.
Usage
cas_set_options(
project = NULL,
website = NULL,
use_db = TRUE,
base_folder = NULL,
db_type = "SQLite",
db_folder = NULL
)
Arguments
- project
Defaults to NULL. Project name, can be set once per session with
cas_set_options()
. This will be used as first level folder and may be used elsewhere to describe the dataset.- website
Defaults to NULL. Website name, can be set once per session with
cas_set_options()
. This will be used as a second level folder and may be used elsewhere to describe the dataset.- use_db
Defaults to TRUE. If TRUE, stores information about the download process and extracted text in a local database.
- base_folder
Defaults to NULL, can be set once per session with
cas_set_options()
. A path to a location used for storing html and other project files. If the folder does not exist, it will be created. If not given, and not previously set as environment variable, defaults tocastarter_data
.- db_folder
Defaults to NULL. can be set once per session with
cas_set_options()
orcas_set_db_folder()
. A path to a location used for storing the database. If not given, and not previously set as environment variable, defaults tocastarter_data
.
See also
Other settings:
cas_get_options()
Examples
cas_set_options(base_folder = fs::path(fs::path_temp(), "castarter_data"))
cas_options_list <- cas_get_options()
cas_options_list
#> $project
#> [1] "example_project"
#>
#> $website
#> [1] "example_website"
#>
#> $use_db
#> [1] TRUE
#>
#> $base_folder
#> [1] "/tmp/Rtmp1QODEK/castarter_data"
#>
#> $db_type
#> [1] "SQLite"
#>
#> $db_folder
#> [1] "/tmp/Rtmp1QODEK/cas_data"
#>