File: matrix.rank.Rd

package info (click to toggle)
r-cran-matrixcalc 1.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: makefile: 2
file content (38 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
\name{matrix.rank}
\alias{matrix.rank}
\title{ Rank of a square matrix }
\description{
  This function returns the rank of a square numeric matrix based on the selected method.
}
\usage{
matrix.rank(x, method = c("qr", "chol"))
}
\arguments{
  \item{x}{ a matrix }
  \item{method}{ a character string that specifies the method to be used }
}
\details{
  If the user specifies "qr" as the method, then the QR decomposition function is used to obtain the rank.
  If the user specifies "chol" as the method, the rank is obtained from the attributes of the value returned.
}
\value{
  An integer.
}
\references{
  Bellman, R. (1987). \emph{Matrix Analysis}, Second edition, Classics in Applied Mathematics,
  Society for Industrial and Applied Mathematics.
}
\author{ Frederick Novomestky \email{fnovomes@poly.edu} }
\note{
  If the argument is not a square numeric matrix, then the function presents an error message and stops.
}
\seealso{
  \code{\link{is.square.matrix}}
}  
\examples{
A <- diag( seq( 1, 4, 1 ) )
matrix.rank( A )
B <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE )
matrix.rank( B )
}
\keyword{ math }