[R] nrow()

Sandra Stankowski hmvstoreaddict at ymail.com
Tue Feb 22 16:11:45 CET 2011


Hey there,

I tried to count the number of rows, where my data isn't NaN in a 
certain column.

this was my guess:

(given is a data frame with 2069 rows and 17 cols)

NROW(data[jan,16] != NaN)

("jan" is defined this way: jan <- which(data[,2]==1, arr.ind= TRUE))


but I only get the number of columns where my data is "1" in the second 
col. R isn't removing the NaN.
na.rm isn't working here.

I would appreciate your help.



More information about the R-help mailing list