search for: tp3049010p3049171

Displaying 1 result from an estimated 1 matches for "tp3049010p3049171".

2010 Nov 18
2
conditional mean between two data frames with different levels
Hi guys, I have two data frames: one referred to 2008 and one to 2009. Their structure is identical except for the different data in them. I need to create a vector alfa of the same length of the dataframe 2009 and fill each element with the mean of 2008$var1 conditional to the subgroup indicated by a factor variable in 2009$var2. In this case it would be easy to use the function