collapse: Column-wise average a matrix of variables, collapsing over...

Description Usage Arguments Examples

View source: R/asca.R

Description

Column-wise average a matrix of variables, collapsing over some set of factors

Usage

1
collapse(form, X, design)

Arguments

form

the formula defining the model to collapse over

X

the matrix to collpased over rows

design

the data.frame containing the variables reference in form

Examples

1
2
3
X <- matrix(rnorm(20*10), 20, 10)
des <- data.frame(a=rep(letters[1:4], 5), b=factor(rep(1:5, each=4)))
xcoll <- collapse(~ a+b, X, design=des)

bbuchsbaum/neuropls documentation built on Dec. 9, 2020, 7:02 p.m.