View source: R/read_textdata.R
read_types | R Documentation |
Returns the included data source types
as a
tibble
.
Names and shortnames from namelist
are added,
in English by default.
read_types(
path = pkgdatasource_path("textdata/types", ".yml"),
file = "types",
file_namelist = "namelist",
lang = "en"
)
path |
Location of the data sources |
file |
The filename of the |
file_namelist |
The filename of the |
lang |
An
IETF BCP 47 language tag, such as |
types
is a data source in the
vc-format which provides
a checklist of types, represented by their current codes, together
with several attributes.
A 'type' refers to either a (main) habitat type, a
habitat subtype or a regionally important biotope (RIB).
read_types()
reads the types
data source, adds
names + shortnames
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
names (lang = "en"
) are returned for types, attributes and tags.
Note that factors are generated with implicit NA
values (i.e. there is
no factor level to represent the missing values).
If you want this category to appear in certain results, you can convert
such variables with
forcats::fct_explicit_na()
.
The types
data frame as a tibble
,
with names & shortnames added for types, attributes and tags
according to the lang
argument.
See types
for documentation of the data-source's contents.
See namelist
for the link between codes or other identifiers
and the corresponding names (and shortnames).
The added names and shortnames are represented by the following variables:
type_name
type_shortname
typeclass_name
hydr_class_name
hydr_class_shortname
groundw_dep_name
groundw_dep_shortname
flood_dep_name
flood_dep_shortname
tag_1_name
tag_1_shortname
tag_2_name
tag_2_shortname
tag_3_name
tag_3_shortname
Except for the tags, the names and shortnames are factors with their level order according to that of the corresponding attribute.
read_types()
read_types(lang = "nl")
types
Other reading functions for n2khab-referencelists:
read_env_pressures()
,
read_namelist()
read_types()
read_types(lang = "nl")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.