Dear Frederico,

Try

d[, rowSums(d) != 0]

where "d" is your data.frame().

HTH,
Jorge.-

On Thu, Dec 22, 2011 at 4:54 PM, Frederico Mestre <> wrote:

> Hello all:
>
>
>
> I'm sure this is quite simple, but I tried several options and I still
> can't
> get I right.
>
>
>
> I've got a data.frame and I want to delete all columns of which the sum is
> zero.
>
>
>
> Any ideas? Thanks,
>
>
>
> Frederico Mestre
>
>
>
>
>        [[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