Error with hts package

时间:2015-07-31 19:28:22

标签: r time-series

I repeatedly get an annoying error with the hts() function even for the example in the help.

Any idea what the problem is?

library(hts)

abc <- ts(5 + matrix(sort(rnorm(1000)), ncol = 10, nrow = 100))
colnames(abc) <- c("A10A", "A10B", "A10C", "A20A", "A20B",
                   "B30A", "B30B", "B30C", "B40A", "B40B")
y <- hts(abc, characters = c(1, 2, 1))

Error:

Error in hts(abc, characters = c(1, 2, 1,)) :
  4 arguments passed to  .Internal(nchar) which requires 3

sessionInfo():

R version 3.2.0 (2015-04-16)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                  
[5] LC_TIME=German_Germany.1252   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
[1] hts_4.5           Matrix_1.2-0      SparseM_1.6       forecast_6.1      timeDate_3012.100 zoo_1.7-12      

loaded via a namespace (and not attached):
[1] colorspace_1.2-6 parallel_3.2.0   tools_3.2.0      nnet_7.3-9       Rcpp_0.11.6      fracdiff_1.4-2   tseries_0.10-34  grid_3.2.0     
 [9] lattice_0.20-31  quadprog_1.5-5 

0 个答案:

没有答案