sf_recode: Turns codes to names or vice versa in Statistics Finland...

View source: R/sf_recode.R

sf_recodeR Documentation

Turns codes to names or vice versa in Statistics Finland classifications

Description

Recode statfin classifications from numeric codes to names or vice versa. sf_code2name and sf_name2code and shortcuts to main sf_recode function.

Usage

sf_recode(x, from, to, ...)

sf_code2name(x, ...)

sf_name2code(x, ...)

Arguments

x

A vector for recoding.

from

A column name or position for orginal classification in the classification data.frame. See sf_get_class.

to

A column name or position for desidered classification in the classification data.frame. See sf_get_class.

...

futher parameters to sf_get_class to select classification.

Details

It is best to use column postions for from and to. The first should be a numeric code and the second a name.

Functions

  • sf_code2name(): From code to name.

  • sf_name2code(): From name to code.


pttry/statfitools documentation built on Feb. 2, 2025, 1:50 a.m.