Skip to contents

Get connection to database with details about current website

Usage

cas_get_db(
  db_folder = NULL,
  base_folder = NULL,
  project = NULL,
  website = NULL
)

Arguments

db_folder

Defaults to NULL. can be set once per session with cas_set_options() or cas_set_db_folder(). A path to a location used for storing the database. If not given, and not previously set as environment variable, defaults to castarter_data.

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 to castarter_data.

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.

Examples


cas_get_db(
  base_folder = fs::path_temp(),
  project = "example_project",
  website = "example_website"
)
#> <SQLiteConnection>
#>   Path: 
#>   Extensions: TRUE