[R-SIG-Finance] "Package", please ...

Robert Nicholson robert.nicholson at gmail.com
Fri Mar 12 06:42:10 CET 2010


Why isn't zoo rollapply written to take the return type? Why do you have to wrap the return value?

if I start with an xts and rollapply I get a zoo and I'm required to wrap in an as.xts so why couldn't rollapply
be written to accept the return value or derive the return value from the type of data?

On Mar 5, 2010, at 10:16 AM, Martin Maechler wrote:

>>>>>> "Jm" == Judson m <judsonm123 at yahoo.com>
>>>>>>    on Fri, 5 Mar 2010 06:17:49 -0800 (PST) writes:
> 
>>> Here was a naive attempt to do standard deviation with
>>> sliding window
>>>> require(quantmod) getSymbols("AAPL") AAPL$STDDEV =
>>>> sd(Cl(AAPL), 20) AAPL$SMA = SMA(Cl(AAPL), 10) AAPL
> 
>    Jm> I am pretty sure that rollapply in the ZOO library would
>    Jm> work for you.
> 
> There's neither "ZOO" nor would that be "library".
> 
> It is   "zoo"   and it  is a *package*.
> 
> Martin Maechler, ETH Zurich



More information about the R-SIG-Finance mailing list