Skip to content
Prev 248888 / 398506 Next

Finding a Diff within a Dataframe columns

Please take a look at the introduction to R too ...
A   B   C    D
1 0.1 0.7 0.9 0.80
2 0.2 0.6 0.8 0.70
3 0.4 0.8 0.7 0.76
Error in d["A-B"] <- with(df, A - B) : object 'd' not found
Error in d$v1 <- with(df, A - B) : object 'd' not found
Error: object 'd' not found
A   B   C    D   v1
1 0.1 0.7 0.9 0.80 -0.6
2 0.2 0.6 0.8 0.70 -0.4
3 0.4 0.8 0.7 0.76 -0.4
A   B   C    D   v1    v2
1 0.1 0.7 0.9 0.80 -0.6  0.10
2 0.2 0.6 0.8 0.70 -0.4  0.10
3 0.4 0.8 0.7 0.76 -0.4 -0.06
On Mon, Jan 31, 2011 at 7:02 AM, Ramya <ramya.victory at gmail.com> wrote: