Commit 637ff68
committed
Handle 'width' when it's a numeric vector
rollapply.xts() only supports 'width' when it's a scalar, while
rollapply.zoo() supports 'width' when it's a vector of multiple values.
Support this in rollapply.xts() by converting 'data' to zoo, calling
rollapply() on the zoo object, and converting the result back to xts.
Thanks to James Hirschorn (@quantitative-technologies) for the report,
and to @npschweizer for the nudge to fix.
Fixes #290.1 parent bfec4d1 commit 637ff68
2 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
25 | 40 | | |
26 | 41 | | |
27 | 42 | | |
| |||
42 | 57 | | |
43 | 58 | | |
44 | 59 | | |
45 | | - | |
46 | | - | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments