Error with Rollmean
On Fri, Sep 23, 2011 at 2:01 PM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
On Fri, Sep 23, 2011 at 1:51 PM, John Kerpel <john.kerpel at gmail.com> wrote:
Here's an example:
?library(timeSeries) ?library(zoo) data(MSFT) MSFT.zoo <- as.zoo(MSFT[,"Close"]) head(MSFT.zoo)
? ? ? ? ? ? ?Close 2000-09-27 60.6250 2000-09-28 61.3125 2000-09-29 60.3125 2000-10-02 59.1250 2000-10-03 56.5625 2000-10-04 55.4375
MSFT.zoo.3 <- rollmean(MSFT.zoo, 3)
Error in `colnames<-`(`*tmp*`, value = "Close") : ? attempt to set colnames on object with less than two dimensions
Thanks. ?Its now fixed in the development version. ?Use svn version
899 or later or add this to your code:
source("http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/zoo/R/rollmean.R?revision=899&root=zoo")
I have made one more fix so it should be svn 900 or:
source("http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/zoo/R/rollmean.R?revision=900&root=zoo")
Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com