[R] removing particular  row from matrix
    uday 
    uday_143_4u at hotmail.com
       
    Wed Feb 22 19:50:00 CET 2012
    
    
  
Hi Petr, 
Thanks for reply 
sorry for late message there was typo error the both values are -999.99 
 a[rowSums(a ==  -999.99) == 0, ], this solution works only if we have to
remove certain value from matrix. 
but if 
a<-matrix(c(1,2,3,5,-999.99,5,-999.99,6,1,5,9,1),nrow=4)  
a
     [,1]    [,2] [,3]
[1,]    1 -999.99    1
[2,]    2    5.00    5
[3,]    3 -999.99    9
[4,]    5    6.00    1
and I would like to remove whole row those have value -999.99 , this
particular function does not work
I got error 
Error in rowSums(a[, 2] == -999.99) : 
  'x' must be an array of at least two dimensions
 it need matrix, so is there any way to deal with this kind of problem. 
Cheers 
Uday 
--
View this message in context: http://r.789695.n4.nabble.com/removing-particular-row-from-matrix-tp4407401p4411348.html
Sent from the R help mailing list archive at Nabble.com.
    
    
More information about the R-help
mailing list