Learn R Programming

OpasnetUtils (version 1.1.0)

CollapseTableParser: Parsing Collapse orders from a table

Description

Parses data.frames of specific format to produce "Col" prefixed lists for CheckCollapse

Usage

CollapseTableParser(CTable, env = .GlobalEnv)

Arguments

CTable
a data.frame with columns "Variable" (variable names), "Index" (column names) and "Probs" (propabilities of column levels in marginal distribution, comma separated)
env
target environment, default is .GlobalEnv

Value

  • No return value, "Col" prefixed variables are written straight into specified environment.

Details

Used in the Opasnet assessments/analyses to produce multiple model specific Collapse instructions. Using other distribution values than 1 requires knowledge about the amount and order of unique index values. Probs values 1 and NA are considered equal weighting. See also: http://en.opasnet.org/

Examples

Run this code
a <- data.frame(Variable = "test", Index = c("City"), Probs = 1)
CollapseTableParser(a)
Coltest

Run the code above in your browser using DataLab