Displaying 1 result from an estimated 1 matches for "avgain".
Did you mean:
again
2009 Mar 17
2
Difficulty Replacing a Row of a Data Frame
I have the following data frames, avGain and retGain. They have the same
dimensions.
The following line of code replaces row j of avGain as desired:
avGain[j, ] <- mean( retGain[jStart:j, ] )
However, the following line does not work:
avGain[j, ] <- ( avGain[j-1, ] * ( DAYS - 1 ) + retGain[j, ] ) / DAYS
If I do...