search for: value2remov

Displaying 1 result from an estimated 1 matches for "value2remov".

Did you mean: value2remove
2009 Jan 14
3
remove columns containing all zeros (or other value)
Hello- I would like to remove the columns of a matrix that contain all zeros. For example, from x<-matrix(c(1,5,3,2,1,4,0,0,0), ncol=3,nrow=3) I would like to remove the third column. However, because this is in a loop I need a way to first determine which columns are all zeros, and only then remove them. I.e., I don't know which column of x contains all zeros until after x is