read_env_pressures: Return the 'env_pressures' data source as a tibble with...

View source: R/read_textdata.R

read_env_pressuresR Documentation

Return the 'env_pressures' data source as a tibble with human-readable attributes

Description

Returns the included data source env_pressures as a tibble. Names, shortnames, explanations and optional remarks from namelist are added, in English by default.

Usage

read_env_pressures(
  path = pkgdatasource_path("textdata/env_pressures", ".yml"),
  file = "env_pressures",
  file_namelist = "namelist",
  lang = "en"
)

Arguments

path

Location of the data sources env_pressures and namelist. The default is to use the location of the data sources as delivered by the installed package.

file

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

file_namelist

The filename of the namelist 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 human-readable attributes to be returned in the tibble.

Details

env_pressures is a data source in the vc-format which provides a checklist of environmental pressures, represented by codes, together with the pressure-class and the textual explanation.

read_env_pressures() reads the env_pressures data source, adds human-readable attributes 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 English text (lang = "en") is returned for names of environmental pressures and pressure-classes, and for textual explanations and remarks.

Value

The env_pressures data frame as a tibble, with human-readable text added for environmental pressures, pressure-classes and textual explanations and remarks according to the lang argument. The tibble has 35 rows and 7 variables. See env_pressures for documentation of the data-source's contents. See namelist for the link between codes or other identifiers and the corresponding text.

The human-readable attributes are represented by the following variables:

ep_abbrev

A (language-dependent) abbreviation (alternative code) of the environmental pressure. Is a factor with the level order coinciding with that of ep_code.

ep_name

The name of the environmental pressure. Is a factor with the level order coinciding with that of ep_code.

ep_class_name

The name of the environmental pressure's class. Is a factor with the level order coinciding with that of ep_class.

explanation

An explanation of the environmental pressure.

remarks

Optional remarks about the environmental pressure.

Recommended usage

read_env_pressures()

read_env_pressures(lang = "nl")

See Also

env_pressures

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

Examples

read_env_pressures()
read_env_pressures(lang = "nl")


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