May 23, 2012 7:45 PM
> To: r-help@r-project.org
> Subject: [R] Exclude when sd=0
>
> How do I trim a matrix to exclude columns that have no standard
> deviation?
>
> Thanks,
>
> Chris
>
> [[alternative HTML version deleted]]
>
> _
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]]
>
>
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
__
R-help@r-project.org mailing list
ht
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 ht
4 matches
Mail list logo