[R] Behavior of self-defined function within ddply

2014-01-15 Thread Amitabh Dugar
I have a dataframe small whch has 5,000 rows and contains data for several tickers every month, as below: monthend_n ticker wgtdiff ret interval b1 b2 b3 b4 b5 b6 1 19990228 AA 0.7172 -2.58 0.33896 -0.5868 -0.24784 0.09112 0.43008 0.76904 1.108 2 19990228 AAPL -0.0828 -15.48 0.33896

[R] How to use ddply

2014-01-13 Thread Amitabh Dugar
I have never used R-help to pose a question to the R-users community; is sending this Email the right way to do so? I am trying to use the ddply function in the plyr package to accomplish the following: I have a data frame of the type:      ticker monthend_n wgtdiff    ret 156      AA