Learn R Programming

klassR (version 1.0.5)

Classifications for Statistics Norway

Description

Functions to search, retrieve, apply and update classification standards and code lists using Statistics Norway's API from the system 'KLASS'. Retrieves classifications by date with options to choose language, hierarchical level and formatting.

Copy Link

Version

Install

install.packages('klassR')

Monthly Downloads

238

Version

1.0.5

License

MIT + file LICENSE

Maintainer

Susie Jentoft

Last Published

February 26th, 2026

Functions in klassR (1.0.5)

get_name

Get the name of a classification version
is_split

Given a graph and a node, determine if the node is a split code.
get_variant_name

Get variant name Internal function for fetching the variant name based on the number
update_klass

Update multiple Klass codes to a desired date.
update_code

Update a code found in a directed graph based on a Klass-classification
klass_131_2020_graph

Test Graph data for municipalities in 2020
formattering_kommune

Format vector for kommune codes
formattering_nace

Format vector for industry codes
klass_131_graph

Test Graph data for municipalities in 2024
get_version

Get version number of a class given a date
is_combined

Given a graph and a node, determine if the node is a result of combinations of multiple codes.
levelCheck

Check which level the input data/vector is
klassdata

Testdata for klassR package
find_dates

For a given Klass code, produce a table of dates describing the valid-from and valid-to dates of all versions of the code
search_klass

Search Klass
klass_131_1964_graph

Test Graph data for municipalities in 1964
stop_quietly

Stop quietly function Stop from a function without an error. Used for stopping when no internet
find_variant_to

Find the variant of a code corresponding to a change *to* a specific code.
klass_node

Given a Klass graph, find the node corresponding to a code and (optionally) a date.
update_klass_node

Given a node and a graph, find the node at the end of a sequence of changes.
klass_graph

Build a directed graph of code changes based on a Klass classification
formattering

Format vector for industry codes
Levels

Title
CheckDate

Internal function to check date
ConvertTable

Code level convert table (internal function)
apply_klass

Match and convert a classification
correspond_list

Correspondence list Print a list of correspondence tables for a given classification with source and target IDs
check_connect

Check connection Function to check that a connection to data.ssb.no is able to be established
GetBaseUrl

Get base address for fetching classifications from
MakeUrl

Internal function to create URL address
MakeChar

Conversion to character
GetUrl

Get json file from Url
GetUrl2

Get json file from Url - alternative version
GetNums

Get target ID numbers from Url
count_neighbors

Count the neighbors of a node.
find_variant_from

Find the variant of a code corresponding to a change *from* a specific code.
find_name

Find the name of a code valid at a specific date.
list_family

Classification family list Print a list of all families and the number of classifications in each
get_family

Identify corresponding family from a classification number
list_klass

Classification list Get a full list of all classifications and codelists
get_klass

Fetch Statistics Norway classification data using API