Re: [R] condition and function

2013-05-12 Thread Berend Hasselman
On 13-05-2013, at 08:16, catalin roibu wrote: > Hello all! > I want to create a new variable in a dataframe, and this variable is based > on a regression equation. For example for example for the hc<=10, the > values of the new variable(d0.3) is obtained by d0.3=15.9122+0.2105*dc, for > hc<=30,

[R] condition and function

2013-05-12 Thread catalin roibu
Hello all! I want to create a new variable in a dataframe, and this variable is based on a regression equation. For example for example for the hc<=10, the values of the new variable(d0.3) is obtained by d0.3=15.9122+0.2105*dc, for hc<=30, d0,3 values are obtained by d0.3=1.4781+0.8827*dc. Thank y