read_namelist: Return the 'namelist' data source as a tibble

View source: R/read_textdata.R

read_namelistR Documentation

Return the 'namelist' data source as a tibble

Description

Returns the included data source namelist as a tibble, by default filtered according to English names and shortnames.

Usage

read_namelist(
  path = pkgdatasource_path("textdata/namelist", ".yml"),
  file = "namelist",
  lang = "en"
)

Arguments

path

Location of the data source. The default is to use the location of the data source as delivered by the installed package.

file

The filename of the data source, without extension. The default is to use the file delivered by the installed package.

lang

An IETF BCP 47 language tag, such as "en" or "nl", to specify the language of name and shortname to be returned in the tibble. If lang = "all", the full namelist tibble is returned, i.e. containing all languages.

Details

namelist is a data source in the vc-format which provides names and (optionally) shortnames for IDs/codes used in other data sources.

read_namelist() reads it and returns it as a tibble. A tibble is a data frame that makes working in the tidyverse a little easier. By default, the data version delivered with the package is used and only English names (lang = "en") are returned.

Value

The namelist data frame as a tibble, filtered according to the lang argument. See namelist for documentation of the tibble's contents.

Recommended usage

read_namelist()

read_namelist(lang = "nl")

See Also

namelist

Other reading functions for n2khab-referencelists: read_env_pressures(), read_types()

Examples

read_namelist()
read_namelist(lang = "nl")


inbo/n2khab documentation built on Jan. 15, 2025, 9:36 a.m.