[R] Exclude when sd=0

David Winsemius dwinsemius at comcast.net
Thu May 24 06:49:22 CEST 2012


On May 23, 2012, at 8:44 PM, Chris Burns wrote:

> How do I trim a matrix to exclude columns that have no standard  
> deviation?
>

  mtx[ , as.logical(apply(mtx, 2, sd))]


-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list