Skip to content
Prev 318547 / 398503 Next

Conditional Weighted Average (ddply or any other function)

Thanks for the data .

You have an undefined variable in the ddply statement.  There is no MKTCAP in the data.frame.  


You also have one two many ) in the statement. I think it should read:
ddply (dat1 , .(Sector, FISCALYEAR), summarise, WROE=wavg(ROE, MKTCAP))



John Kane
Kingston ON Canada
____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys
Works with AIM?, MSN? Messenger, Yahoo!? Messenger, ICQ?, Google Talk? and most webmails