[R] OK - I got the data - now what? :-)

Mark Knecht markknecht at gmail.com
Sun Jul 5 22:33:36 CEST 2009


On Sun, Jul 5, 2009 at 1:00 PM, Henrique Dallazuanna<wwwhsd at 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 <markknecht at gmail.com> wrote:
>>
>> On Sun, Jul 5, 2009 at 12:30 PM, Henrique Dallazuanna<wwwhsd at 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




More information about the R-help mailing list