Re: [R] Eliminating columns that sum to zero

2008-08-24 Thread Douglas Bates
On Sun, Aug 24, 2008 at 11:54 AM, Ben Bolker <[EMAIL PROTECTED]> wrote: > > > Wade Wall gmail.com> writes: > >> I am trying to look for a way to eliminate columns that sum to zero. Any >> help would be appreciated. > > x_without_zero_cols <- x[,colSums(x)!=0] Of course, depending on the nature o

Re: [R] Eliminating columns that sum to zero

2008-08-24 Thread Ben Bolker
Wade Wall gmail.com> writes: > I am trying to look for a way to eliminate columns that sum to zero. Any > help would be appreciated. x_without_zero_cols <- x[,colSums(x)!=0] If you want to make some return for this helpful advice, you could take this information and add it to the "R tips"

[R] Eliminating columns that sum to zero

2008-08-24 Thread Wade Wall
Hi all, I am trying to look for a way to eliminate columns that sum to zero. Any help would be appreciated. Wade [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r