Skip to content
Prev 29929 / 398500 Next

volkswirt at gmx.net writes:
Like this?

m <- matrix(rnorm(20),ncol=2)
m[6,1]<-NA
m[-which(m[,1]<=0),]

(Notice that this is not the same as m[m[,1]>0,] as soon as NA's are
involved).