powered by
Match and convert a classification
ApplyKlass( x, klass, date = NULL, variant = NULL, correspond = NULL, language = "nb", output_level = NULL, output = "name", format = TRUE )
A vector or data frame is returned with names and/or code of the desired output level.
Input vector
Classification number
Date for classification (format = "YYYY-mm-dd"). Default is current date
The classification variant to fetch (if a variant is wanted).
ID number for target in correspondence table. For correspondence between two dates within the same classification, use correspond = TRUE.
Default "nb" for Norwegian (Bokmål). Also "nn" (Nynorsk) and "en" (English available for some classifications)
Desired output level
String describing output. May be "name" (default), "code" or "both".
Logical for whther to run formatting av input vector x (Default = TRUE), important to check if formatting is in one level.
data(klassdata) kommune_names <- ApplyKlass(x = klassdata$kommune, klass = 131, language = "en", format=FALSE)
Run the code above in your browser using DataLab