Hi! Maybe this is a silly question, but I need the column rank
(http://en.wikipedia.org/wiki/Rank_matrix) of a matrix and R function
'rank()' only gives me the ordering of the elements of my matrix.
How can I compute the column rank of a matrix? Is there not an R
equivalent to Matlab's 'rank()'?
I've been browsing for a time now and I can't find anything, so any
help will be greatly appreciated. Best regards!
-- --
Jose Luis Aznarte M. http://decsai.ugr.es/~jlaznarte
Department of Computer Science and Artificial Intelligence
Universidad de Granada Tel. +34 - 958 - 24 04 67
GRANADA (Spain) Fax: +34 - 958 - 24 00 79
On 4/6/07, "Jos? Luis Aznarte M." <jlaznarte at decsai.ugr.es> wrote:> Hi! Maybe this is a silly question, but I need the column rank > (http://en.wikipedia.org/wiki/Rank_matrix) of a matrix and R function > 'rank()' only gives me the ordering of the elements of my matrix. > How can I compute the column rank of a matrix? Is there not an R > equivalent to Matlab's 'rank()'? > I've been browsing for a time now and I can't find anything, so any > help will be greatly appreciated. Best regards!This discussion may help you: http://marc.info/?l=r-help&m=111522337531442&w=2 Paul
On Apr 6, 2007, at 7:39 AM, Jos? Luis Aznarte M. wrote:> Hi! Maybe this is a silly question, but I need the column rank > (http://en.wikipedia.org/wiki/Rank_matrix) of a matrix and R function > 'rank()' only gives me the ordering of the elements of my matrix. > How can I compute the column rank of a matrix? Is there not an R > equivalent to Matlab's 'rank()'? > I've been browsing for a time now and I can't find anything, so > any > help will be greatly appreciated. Best regards! >Surprisingly, google searching for "r matrix rank" actually returns a R link: http://tolstoy.newcastle.edu.au/R/help/05/05/4000.html I suppose the point is that in R you usually need a bit more than just the rank, so instead you want an object that contains all that info and more. Like we have the various lm objects, so to speak. They do the hard work once, and then we can ask them more particular questions. ?qr> -- -- > Jose Luis Aznarte M. http://decsai.ugr.es/~jlaznarte > Department of Computer Science and Artificial Intelligence > Universidad de Granada Tel. +34 - 958 - 24 04 67 > GRANADA (Spain) Fax: +34 - 958 - 24 00 79Haris Skiadas Department of Mathematics and Computer Science Hanover College
How about
qr(A)$rank
or perhaps
qr(A, LAPACK=TRUE)$rank
Cheers,
Andy
__________________________________
Andy Jaworski
518-1-01
Process Laboratory
3M Corporate Research Laboratory
-----
E-mail: apjaworski at mmm.com
Tel: (651) 733-6092
Fax: (651) 736-3122
"Jos? Luis
Aznarte M."
<jlaznarte at decsai To
.ugr.es> r-help at stat.math.ethz.ch
Sent by: cc
r-help-bounces at st
at.math.ethz.ch Subject
[R] Computing the rank of a matrix.
04/06/2007 06:39
AM
Hi! Maybe this is a silly question, but I need the column rank
(http://en.wikipedia.org/wiki/Rank_matrix) of a matrix and R function
'rank()' only gives me the ordering of the elements of my matrix.
How can I compute the column rank of a matrix? Is there not an R
equivalent to Matlab's 'rank()'?
I've been browsing for a time now and I can't find anything, so any
help will be greatly appreciated. Best regards!
-- --
Jose Luis Aznarte M. http://decsai.ugr.es/~jlaznarte
Department of Computer Science and Artificial Intelligence
Universidad de Granada Tel. +34 - 958 - 24 04 67
GRANADA (Spain) Fax: +34 - 958 - 24 00 79
______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.