map_to_classification: Currently only works for N-to-1 concordances

View source: R/classifications.R

map_to_classificationR Documentation

Currently only works for N-to-1 concordances

Description

Currently only works for N-to-1 concordances

Usage

map_to_classification(origin_id, origin_value, origin_etc, concordance)

Arguments

origin_id

vector of length N with the ids of the original classification

origin_value

vector of length N with the values of the original classification

origin_etc

vector of length N OR data.frame with nrow = N with additional attributes (such as Year, Country, ...)

concordance

either matrix with given col- and row-names (=concordance matrix) or data.frame. Expressing the way how the original classification shall be mapped to the 'new' classification. If it is a matrix the rows represent the original ids, the columns the new ids. If it is data.frame the first row represents the original ids, the second the new ones.

Value

a data.frame / data.table (currrently)


simschul/my.utils documentation built on June 29, 2023, 6:50 a.m.