Re: [R] delete all columns with all values equal to zero

2011-12-22 Thread Jorge I Velez
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

Re: [R] delete all columns with all values equal to zero

2011-12-22 Thread Jorge I Velez
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

Re: [R] delete all columns with all values equal to zero

2011-12-22 Thread Peter Alspach
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

Re: [R] delete all columns with all values equal to zero

2011-12-22 Thread Sarah Goslee
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()

[R] delete all columns with all values equal to zero

2011-12-22 Thread Frederico Mestre
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]] __