namelist_factor: Translates a factor with levels mapped according to the...

View source: R/read_textdata.R

namelist_factorR Documentation

Translates a factor with levels mapped according to the namelist

Description

Translates a factor, by default using the 'name' variable from the 'namelist' object to substitute the factor levels. The join on 'namelist' is by the variable 'code'.

Usage

namelist_factor(x, pick = "name", codelist)

Arguments

x

A factor.

pick

A character, referring to the variable from namelist ("name" or "shortname") that should be used as translated factor levels.

codelist

An object conforming to namelist.

Value

A factor.


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