regroup: Collapses a matrix by summing over rows

Description Usage Arguments Value Author(s) Examples

Description

Collapses a matrix by summing over a specific number of rows

Usage

1

Arguments

data

a matrix

g

a positive integer beween 1 and the number of rows of data

Value

reduced matrix found by summing over rows

Author(s)

Jim Albert

Examples

1
2
3
data=matrix(c(1:20),nrow=4,ncol=5)
g=2
regroup(data,2)

LearnBayes documentation built on May 1, 2019, 7:03 p.m.