File: regroup.Rd

package info (click to toggle)
r-cran-learnbayes 2.15.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,864 kB
  • sloc: sh: 15; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
\name{regroup}
\alias{regroup}
\title{Collapses a matrix by summing over rows}
\description{
Collapses a matrix by summing over a specific number of rows 
}
\usage{
regroup(data,g)
}
\arguments{
  \item{data}{a matrix}
  \item{g}{a positive integer beween 1 and the number of rows of data}
}

\value{
 reduced matrix found by summing over rows
}
\author{Jim Albert}

\examples{
data=matrix(c(1:20),nrow=4,ncol=5)
g=2
regroup(data,2)
}
\keyword{models}