[R] selecting subsets of data from matrix
    Jason Turner 
    jasont at indigoindustrial.co.nz
       
    Mon Oct 20 23:04:17 CEST 2003
    
    
  
Laura Quinn wrote:
> Thanks for your help everyone,
> 
> My data is a matrix. However if i use the command:
> 
> x[(x[,20] > 315 | x[,20] < 45), ]
> 
> and then request a summary, I get a warning message saying that a large
> number of the row names have been duplicated - I don't understand this?
If x is the original matrix, and subx is the subseted matrix
(x[(x[,20] > 315 | x[,20] < 45), ])  ...
Do you get this warning message when you type summary(x)?
If you're not explicitly using the rownames for anything other than 
labeling, it can be safely ignored.  Duplicate rownames are a bit 
strange to R, but they're not illegal in matricies.
Cheers
Jason
-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz
    
    
More information about the R-help
mailing list