CT: Create correspondence table object

Description Usage Arguments Value

View source: R/constructor.R

Description

Create correspondence table object

Usage

1
2
3
4
5
6
7
8
CT(
  x,
  source = 1,
  target = 2,
  value = 3,
  source_name = "source",
  target_name = "target"
)

Arguments

x

either in long format (data.table/frame with three cols: source, target, value), or in wide format (matrix) with rownames (source) and colnames (target)

source

numeric: column of x where to find the source classification (only if x is data.table)

target

numeric: column of x where to find the target classification (only if x is data.table)

value

numeric: column of x where to find the value classification (only if x is data.table)

source_name

character: name of source classification (only if x is matrix)

target_name

character: name of target classification (only if x is matrix)

Value

an CT object (inherits from data.table and data.frame)


simschul/mapR documentation built on Dec. 24, 2021, 1:18 a.m.