Perhaps this?

X[, apply(X, 2, sd) < 1e-10]

HTH,
Jorge.-


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

> How do I trim a matrix to exclude columns that have no standard deviation?
>
> Thanks,
>
> Chris
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to