CrossStrata {CalibrateSSB}R Documentation

Crossing several factor variables

Description

Create new factor variable by crossing levels in several variables

Usage

CrossStrata(by, sep = "-", returnb = FALSE, asNumeric = FALSE, byExtra = NULL)

Arguments

by

Dataframe or matrix with several variables

sep

Used to create new level names

returnb

When TRUE an overview of original variabels according to new levels are also retuned.

asNumeric

When TRUE the new variable is numeric.

byExtra

Contains the same variables as by and represents another data set.

Value

a

The new variable

aExtra

New variable according to byExtra

b

Overview of original variabels according to new levels

Examples


CrossStrata(cbind(factor(rep(1:3,2)),c('A',rep('B',5)) ))


[Package CalibrateSSB version 1.3.0 Index]