Displaying 1 result from an estimated 1 matches for "newdf1998".
2011 Apr 09
5
Yearly aggregates and matrices
...ALSE))
I'd like to create new dataframes for each unique year in which for each
value of A, the values of D, E and F are summed over the last 3 years (e.g.
1998 = 1998, 1997, 1996):
Question 1: How do I go from DF to newDFyear?
Examples:
newDF1995
B D E F
a 0 4 1
b 3 7 0
e 1 2 3
newDF1998
B D E F
a 1 1 3
b 8 4 6
c 2 4 6
e 1 2 3
Then, for each new DF I need to generate a square matrix after doing the
following:
newDF1998$G<-newDF1998$D + newDF1998$E + newDF1998$F
newDF1998$D<-newDF1998$D/newDF1998$G
newDF1998$E<-newDF1998$E/newDF1998$G
newDF1998$F<-newDF1...