let's say, for example, i have this data:
data <- c(1,2,3,4,5,6,NaN,5,9,NaN,23,9)
attr(data,"dim") <- c(6,2)
data
[,1] [,2]
[1,] 1 NaN
[2,] 2 5
[3,] 3 9
[4,] 4 NaN
[5,] 5 23
[6,] 6 9
Now i want to remove the rows with the NaN values in it: row 1 and 4.
But i don't know where these rows are, if it's a dataset of 100.000+ rows, so i need to find them with a function and remove the complete row.
Can anybody point me in the right direction?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…