Re: [R] apply in zoo

2007-12-30 Thread Gabor Grothendieck
1. Please read the last line on every message to r-help and in particular the part about providing reproducible code when you post. 2. Your third argument to apply is wrong. sharpe is a function but sharpe(...whatever...) is not. Suggest you carefully review the examples on the ?apply page if th

[R] apply in zoo

2007-12-30 Thread Bernd Dittmann
Hi R users, could anyone guide me in the right direction reg. the column-wise application of a function on a zoo dataframe. The tseries function sharpe() can only be applied to a univariate time series. Suppose you have merged the returns of two assets with get.hist.quote(), i.e. set <- merge