rowQ failed
1
0
Entering edit mode
Roger Liu ▴ 260
@roger-liu-2141
Last seen 10.2 years ago
Dear list, I tried to use rowQ to do some test, however, it failed. ">mt<-matrix(1:12,nrow=3) >rowQ(mt,2) Error in rowQ(mt, 2) : 'imat' must be a numeric matrix" however, in the manual page of "rowQ": Usage: rowQ(imat, which) rowMax(imat) rowMin(imat) Arguments: imat: Either a matrix or an 'ExpressionSet'. which: An integer indicating which order statistic should be returned." It seems that imat could be a matrix, but why when I used matrix, it reported error? Thanks. -ZRL [[alternative HTML version deleted]]
• 1.0k views
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.6 years ago
United States
looks like a bug-let, the problem is that you have an integer matrix, and rowQ wants it to be double (but rowQ should convert internally if this is the case) mt=matrix(1:12+0, nrow=3) rowQ(mt, 2) works just fine also, please do follow the posting guide and provide a complete example (including all calls to library etc) and the output of sessionInfo, thanks zrl wrote: > Dear list, > > I tried to use rowQ to do some test, however, it failed. > > ">mt<-matrix(1:12,nrow=3) >> rowQ(mt,2) > Error in rowQ(mt, 2) : 'imat' must be a numeric matrix" > > however, in the manual page of "rowQ": > > Usage: > > rowQ(imat, which) > rowMax(imat) > rowMin(imat) > > Arguments: > > imat: Either a matrix or an 'ExpressionSet'. > > which: An integer indicating which order statistic should be > returned." > > It seems that imat could be a matrix, but why when I used matrix, it > reported error? > Thanks. > > -ZRL > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Robert Gentleman, PhD Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 PO Box 19024 Seattle, Washington 98109-1024 206-667-7700 rgentlem at fhcrc.org
ADD COMMENT
0
Entering edit mode
Hi Robert, Thank you for your response. It works when I explicitly using double type integers. >library("genefilter") >mt1<-matrix(seq(1.0,12.0,1.0),nrow=3) >rowQ(mt1,2) 4 5 6 Thanks. -ZRL On Sun, Jul 26, 2009 at 4:37 PM, Robert Gentleman <rgentlem@fhcrc.org>wrote: > looks like a bug-let, > the problem is that you have an integer matrix, and rowQ wants it to be > double (but rowQ should convert internally if this is the case) > > mt=matrix(1:12+0, nrow=3) > rowQ(mt, 2) > > works just fine > > also, please do follow the posting guide and provide a complete example > (including all calls to library etc) and the output of sessionInfo, > > thanks > > zrl wrote: > >> Dear list, >> >> I tried to use rowQ to do some test, however, it failed. >> >> ">mt<-matrix(1:12,nrow=3) >> >>> rowQ(mt,2) >>> >> Error in rowQ(mt, 2) : 'imat' must be a numeric matrix" >> >> however, in the manual page of "rowQ": >> >> Usage: >> >> rowQ(imat, which) >> rowMax(imat) >> rowMin(imat) >> >> Arguments: >> >> imat: Either a matrix or an 'ExpressionSet'. >> >> which: An integer indicating which order statistic should be >> returned." >> >> It seems that imat could be a matrix, but why when I used matrix, it >> reported error? >> Thanks. >> >> -ZRL >> >> [[alternative HTML version deleted]] >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> > -- > Robert Gentleman, PhD > Program in Computational Biology > Division of Public Health Sciences > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N, M1-B514 > PO Box 19024 > Seattle, Washington 98109-1024 > 206-667-7700 > rgentlem@fhcrc.org > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 639 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6