get.levels.parents.by.types: Find the parent index of each row given a vector levels that...

Description Usage Arguments Value

View source: R/tools.r

Description

Find the parent index of each row given a vector levels that describes the nestedness

Usage

1
2
get.levels.parents.by.types(levels, types,
  parent.types = setdiff(unique(types), c(NA)))

Arguments

levels

integer vector of levels must start with lowest level and increase by 1 or decrease to an integer number

types

character vector of types

parent.types

the parent.types that shall be characterized

Value

a matrix of parent type indices with length(levels) rows and length(parent.types) columns. If there is no parent type, we enter a 0.


skranz/rmdtools documentation built on Oct. 20, 2020, 3:15 p.m.