功能未找到,虽然包安装了附件

时间:2016-12-19 21:20:02

标签: r package

我试图从dcc.est - 包中运行ccgarch。 即使我安装了软件包并将其附加library(ccgarch),我也会收到以下错误:

library(ccgarch)
dcc <- dcc.est(dvar, param)
  

错误:找不到功能“dcc.est”

我也尝试了以下内容:

dcc <- ccgarch::dcc.est(dvar, param)
  

错误:'namespace:ccgarch'

不会导出对象'dcc.est'

根据ccgarch版本0.2.3(https://cran.r-project.org/web/packages/ccgarch/ccgarch.pdf)的插图,dcc.est是该软件包的一部分。我做错了什么?

请参阅下面的sessionInfo

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

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

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

other attached packages:
 [1] pracma_1.9.5          kerdiest_1.2          evir_1.7-3            chron_2.3-48          date_1.2-35          
 [6] fGarch_3010.82.1      fBasics_3011.87       timeSeries_3022.101.2 timeDate_3012.100     rugarch_1.3-6        
[11] tsDyn_0.9-44          ccgarch_0.2.3         gdata_2.17.0          gtools_3.5.0          tidyr_0.6.0          
[16] dplyr_0.5.0          

loaded via a namespace (and not attached):
 [1] rgl_0.96.0                  Rcpp_0.12.8                 mvtnorm_1.0-5               lattice_0.20-34            
 [5] zoo_1.7-14                  assertthat_0.1              digest_0.6.10               lmtest_0.9-34              
 [9] foreach_1.4.3               mime_0.5                    truncnorm_1.0-7             R6_2.2.0                   
[13] plyr_1.8.4                  tseriesChaos_0.1-13         ggplot2_2.2.0               lazyeval_0.2.0             
[17] misc3d_0.8-4                fracdiff_1.4-2              nloptr_1.0.4                SkewHyperbolic_0.3-2       
[21] Matrix_1.2-7.1              htmlwidgets_0.8             munsell_0.4.3               shiny_0.14.2               
[25] numDeriv_2016.8-1           httpuv_1.3.3                DistributionUtils_0.5-1     mnormt_1.5-5               
[29] forecast_7.3                urca_1.3-0                  mgcv_1.8-15                 htmltools_0.3.5            
[33] vars_1.5-2                  nnet_7.3-12                 Rsolnp_1.16                 multicool_0.1-10           
[37] expm_0.999-0                tibble_1.2                  quadprog_1.5-5              codetools_0.2-15           
[41] MASS_7.3-45                 GeneralizedHyperbolic_0.8-1 grid_3.3.2                  nlme_3.1-128               
[45] jsonlite_1.1                xtable_1.8-2                gtable_0.2.0                DBI_0.5-1                  
[49] magrittr_1.5                scales_0.4.1                KernSmooth_2.23-15          tseries_0.10-36            
[53] xts_0.9-7                   sandwich_2.3-4              spd_2.0-1                   iterators_1.0.8            
[57] tools_3.3.2                 ks_1.10.4                   colorspace_1.3-2            knitr_1.15.1 

1 个答案:

答案 0 :(得分:3)

如果您查看NAMESPACE,您会看到dcc.est已被注释掉(可能已被dcc.estimation取代 - 只是一个猜测,我从未使用过这个包吗?)

这意味着它不是由包导出,而是it's still there,仅作为内部函数导出。您可以使用3个冒号

访问内部函数
ccgarch:::dcc.est

正如documentation中那样,我认为在更新和发布的某个地方有人忘了将其正确删除,或者在导出列表中再次取消注释。