Re: [R] replace numbers in a column conditional on their value

2008-01-17 Thread Jabez Wilson
Splendid, thanks for your quick response. [EMAIL PROTECTED] wrote: > I have a data frame column in which I would like to replace some > of the numbers dependent on their value. > > data frame = zz > > AveExpr t P.Value FC > 7.481964 7.323950 1.778503e-04 2.218760 > 7.585783 12.233056 6.679776

Re: [R] replace numbers in a column conditional on their value

2008-01-16 Thread Rolf Turner
On 17/01/2008, at 5:45 AM, Jabez Wilson wrote: > Dear R help, > > I have a data frame column in which I would like to replace some > of the numbers dependent on their value. > > data frame = zz > > AveExpr t P.Value FC > 7.481964 7.323950 1.778503e-04 2.218760 > 7.5857

Re: [R] replace numbers in a column conditional on their value

2008-01-16 Thread Richard . Cotton
> I have a data frame column in which I would like to replace some > of the numbers dependent on their value. > > data frame = zz > > AveExpr t P.Value FC > 7.481964 7.323950 1.778503e-04 2.218760 > 7.585783 12.233056 6.679776e-06 2.155867 > 6.953215 6.996525 2.353705e

Re: [R] replace numbers in a column conditional on their value

2008-01-16 Thread Erik Iverson
Try something like, ##Untested zz$FC <- ifelse(zz$FC > 2, zz$FC^2, zz$FC) and see ?ifelse -Erik Iverson Jabez Wilson wrote: > Dear R help, > > I have a data frame column in which I would like to replace some of the > numbers dependent on their value. > > data frame = zz > > A

[R] replace numbers in a column conditional on their value

2008-01-16 Thread Jabez Wilson
Dear R help, I have a data frame column in which I would like to replace some of the numbers dependent on their value. data frame = zz AveExpr t P.Value FC 7.481964 7.323950 1.778503e-04 2.218760 7.585783 12.233056 6.679776e-06 2.155867 6.953215 6.996525 2.35