# R

From matlib v0.9.2
by Michael Friendly

##### Rank of a Matrix

Returns the rank of a matrix `X`

, using the QR decomposition, `QR`

.
Included here as a simple function, because `rank`

does something different
and it is not obvious what to use for matrix rank.

##### Usage

`R(X)`

##### Arguments

- X
a matrix

##### Value

rank of `X`

##### See Also

##### Examples

```
# NOT RUN {
M <- outer(1:3, 3:1)
M
R(M)
M <- matrix(1:9, 3, 3)
M
R(M)
# why rank=2?
echelon(M)
set.seed(1234)
M <- matrix(sample(1:9), 3, 3)
M
R(M)
# }
```

*Documentation reproduced from package matlib, version 0.9.2, License: GPL (>= 2)*

### Community examples

**siddappahugar12@gmail.com**at Oct 26, 2017 matlib v0.8.1

seven coin are tossed . number of heads noted the experiment this repeated 128 times at the following distribution is obtained using in R 1.fit a binomial distribution function . the two coin is unbaised 2.the nature coin is not known xvalues=0,1,2,3,4,5,6,7,8 fvalues=7,6,19,35,30,23,7,1