[R] deleting collumns with colSums==0
Giovanni Petris
GPetris at uark.edu
Thu Apr 26 14:24:34 CEST 2007
A <- A[, colSums(A) != 0]
(untested)
> Date: Thu, 26 Apr 2007 05:19:21 -0700 (PDT)
> From: Milton Cezar Ribeiro <milton_ruser at yahoo.com.br>
> Sender: r-help-bounces at stat.math.ethz.ch
> Precedence: list
>
> Dear all,
>
> I have some matrices which colSums are equal to zero and I would like to delete all them.
> How can I do that?
>
> Kind regards,
>
> miltinho
> Brazil
>
> __________________________________________________
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
>
--
Giovanni Petris <GPetris at uark.edu>
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/
More information about the R-help
mailing list