On Sun, Jul 5, 2009 at 1:00 PM, Henrique Dallazuanna<www...@gmail.com> wrote: > Yes, > > First, select only columns C1 to C6, then look for values greater than 0, > after use this to select the columns in original subset. > > On Sun, Jul 5, 2009 at 4:48 PM, Mark Knecht <markkne...@gmail.com> wrote: >> >> On Sun, Jul 5, 2009 at 12:30 PM, Henrique Dallazuanna<www...@gmail.com> >> wrote: >> > Try this: >> > >> > subset(test[3,], select=C1:C6)[,subset(test[3,], select = C1:C6) > 0] >> > >> > subset(test[6,], select=C1:C6)[,subset(test[6,], select = C1:C6) > 0] >> > >> > >>
Thanks for the further explanation. One small difference in this approach is that in the general case I have to supply the name of the last column whereas the other just starts at the beginning and goes until it's done. No big deal and possibly an advantage as I could search a subset of the data on the row, i.e. supply both the start and stop columns, for instance C61:C120. This could be valuable as each column generally represents 1 minute further into the experiment, so that range would look at the second hour only. Cheers, Mark ______________________________________________ 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.