Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

regroup

Collapses a matrix by summing over rows


Description

Collapses a matrix by summing over a specific number of rows

Usage

regroup(data,g)

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

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

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.