Re: [R] modifying only certain rows in a data-frame

2010-05-29 Thread jim holtman
try something like: r$deltact[r$time == '0h'] <- 0 On Sat, May 29, 2010 at 7:50 PM, ANJAN PURKAYASTHA wrote: > Hi, > I have a data-frame r (shown below is a subset) with the following column > names: > date    time    sample    vct    norm    hct    deltact > > $time has 8 levels: 0h, 0.5h,

[R] modifying only certain rows in a data-frame

2010-05-29 Thread ANJAN PURKAYASTHA
Hi, I have a data-frame r (shown below is a subset) with the following column names: datetimesamplevctnormhctdeltact $time has 8 levels: 0h, 0.5h, .24h. $deltact holds real numbers. I want to subset this dataframe by the levels of $time. For all the rows which have r$t