toponymOptions: Manage Options of 'toponym'

View source: R/toponym_options.R

toponymOptionsR Documentation

Manage Options of toponym

Description

This function allows users to set the download path for the toponym package. Downloaded data includes toponym data and map data.

Usage

toponymOptions(toponym_path = NULL)

Arguments

toponym_path

character string. Path name for downloaded data. This setting is saved across sessions.

Details

Most functions require external data which will be downloaded and stored for later use. This is described in the respective functions. For this reason, after installation, users will be asked to specify the path for downloaded data. Parameter toponym_path accepts either the character string "pkgdir" or a full, alternative path. "pkgdir" is interpreted as the extdata folder in the toponym package directory, i.e.: system.file("extdata", package = "toponym")

Thus, users can set the path to the package directory with this command:

toponymOptions(toponym_path = "pkgdir")

If a path is provided, users are prompted to confirm their choice. This function will write the new path into toponym_options.rds in the package directory; the path is saved across sessions.

To locate toponym_options.rds, enter:

system.file("extdata", package = "toponym")

To check the path that is currently set, enter:

toponymOptions()

Value

A character string indicating the current path for downloaded data.

Examples

if(interactive()){
# Set the path to the temporary directory
# Users are prompted to confirm their choice.
# Upon confirmation, toponym_options.rds will be edited in the package directory
toponymOptions(toponym_path = tempdir())
# Show the current path
toponymOptions()
}

toponym documentation built on April 13, 2026, 5:06 p.m.