AddContrastVariables: Add contrast variables to data

View source: R/utils.R

AddContrastVariablesR Documentation

Add contrast variables to data

Description

Add contrast variables to data

Usage

AddContrastVariables(data, n.contrast = max(ncol(data)/10, 30))

Arguments

data

data organized in matrix with separate variables in columns

n.contrast

number of constrast variables (defaults to max of 1/10 of variables number and 30)

Value

A list with the following key names:

  • indices – vector of indices of input variables used to construct contrast variables

  • x – data with constrast variables appended to it

  • mask – vector of booleans making it easy to select just contrast variables

Examples

AddContrastVariables(madelon$data)

MDFS documentation built on April 19, 2022, 5:05 p.m.