[R] rank of a matrix

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Wed May 4 18:33:03 CEST 2005


mingan wrote on 5/4/2005 8:54 AM:
> 
> 
> how do I check the rank of a matrix ?
> 
> say
> 
> A=  1   0   0
>     0   1   0
> 
> then rank(A)=2
> 
> what is this function?
> 
> thanks
> 
> 
>  I did try help.search("rank"), but all the returned help information 
> seem irrelevant to what I want.
> 
>  I would like to know how people search for help information like this.
> 
> 
> 
> 
> 
> 
> rank(base)              Sample Ranks
> SignRank(stats)         Distribution of the Wilcoxon Signed Rank
>                        Statistic
> Wilcoxon(stats)         Distribution of the Wilcoxon Rank Sum
>                        Statistic
> friedman.test(stats)    Friedman Rank Sum Test
> kruskal.test(stats)     Kruskal-Wallis Rank Sum Test
> pairwise.wilcox.test(stats)
>                        Pairwise Wilcoxon rank sum tests
> wilcox.test(stats)      Wilcoxon Rank Sum and Signed Rank Tests
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html


See ?qr or ?svd.

tol <- 1e-7
qr(A, tol)$rank
sum(svd(A)$d > tol)

--sundar




More information about the R-help mailing list