anna
2010-Jan-21 23:01 UTC
[R] Na.omit on matrix, does the matrix have to have a limited size
Hello everyone, I am using the na.omit() function on a 785 x 79 matrix. When I restrict the matrix to 10 columns for example it returns me the right result with the na rows deleted: 756 x 10 matrix. But, if I enter the whole matrix it returns me a 64 x 79 matrix, ununderstandable, I have no idea why...Does anyone know what it could be? thanks -- View this message in context: http://n4.nabble.com/Na-omit-on-matrix-does-the-matrix-have-to-have-a-limited-size-tp1068000p1068000.html Sent from the R help mailing list archive at Nabble.com.
Peter Alspach
2010-Jan-21 23:08 UTC
[R] Na.omit on matrix, does the matrix have to have a limited size
Tena koe Anna Presumably because only 69 rows of your matrix have no missing values in any column? HTH .... Peter Alspach> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of anna > Sent: Friday, 22 January 2010 12:01 p.m. > To: r-help at r-project.org > Subject: [R] Na.omit on matrix, does the matrix have to have > a limited size > > > Hello everyone, I am using the na.omit() function on a 785 x > 79 matrix. When I restrict the matrix to 10 columns for > example it returns me the right result with the na rows > deleted: 756 x 10 matrix. But, if I enter the whole matrix it > returns me a 64 x 79 matrix, ununderstandable, I have no idea > why...Does anyone know what it could be? thanks > -- > View this message in context: > http://n4.nabble.com/Na-omit-on-matrix-does-the-matrix-have-to > -have-a-limited-size-tp1068000p1068000.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org 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. >
anna
2010-Jan-21 23:14 UTC
[R] Na.omit on matrix, does the matrix have to have a limited size
No, the NA values are in the same rows and there are only 28 of missing value rows... -- View this message in context: http://n4.nabble.com/Na-omit-on-matrix-does-the-matrix-have-to-have-a-limited-size-tp1068000p1069099.html Sent from the R help mailing list archive at Nabble.com.
Petr PIKAL
2010-Jan-22 12:53 UTC
[R] Na.omit on matrix, does the matrix have to have a limited size
Hi Try also summary(object) or complete.cases(object) to see how are your data organised. Regards Petr r-help-bounces at r-project.org napsal dne 22.01.2010 00:14:06:> > No, the NA values are in the same rows and there are only 28 of missingvalue> rows... > -- > View this message in context:http://n4.nabble.com/Na-omit-on-matrix-does-the-> matrix-have-to-have-a-limited-size-tp1068000p1069099.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.