Sorry for the noise, it should have been colSums(d) instead of what I
wrote. My apologies.
HTH,
Jorge.-
On Thu, Dec 22, 2011 at 10:43 PM, Jorge I Velez <> wrote:
> Dear Frederico,
>
> Try
>
> d[, rowSums(d) != 0]
>
> where "d" is your data.frame().
>
> HTH,
> Jorge.-
>
> On Thu, Dec 22, 2011 a
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 an
Subject: [R] delete all columns with all values equal to zero
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,
F
Hi,
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.
If this, then apply() and sum()
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]]
__
5 matches
Mail list logo