[R] dataframe - column value calculation in R
Timothy Bates
timothy.c.bates at gmail.com
Thu May 26 09:21:23 CEST 2011
On 26 May 2011, at 08:02, Vijayan Padmanabhan wrote:
> I have a requirement for which I am seeking help.
Best to just ask, compactly. This is a very straightforward question: best to read on how to use R: You are just set 1 column of a dataframe to a value based on the others, applying this to all rows: This is just what R does by default
So you can solve your problem by extension from
df$E = sqrt(df$A) + (df$B * df$D)
A B C D
1 2 3 4
More information about the R-help
mailing list