namespaceExport(ns,exports)中的错误:undefined exports:...错误:包或命名空间加载失败

时间:2014-08-20 19:39:25

标签: r namespaces ggplot2

我最近将R更新到最新版本(R版本3.1.1),现在我无法运行加载包。对于ggplot2,运行库(“ggplot2”)后的错误消息是

    *Error in namespaceExport(ns, exports) :   
  undefined exports: ContinuousRange, DiscreteRange, abs_area, alpha, area_pal, as.trans, asn_trans, atanh_trans, boxcox_trans, brewer_pal, cbreaks, censor, col2hcl, comma, comma_format, cscale, date_breaks, date_format, date_trans, dichromat_pal, discard, div_gradient_pal, dollar, dollar_format, dscale, exp_trans, expand_range, extended_breaks, format_format, fullseq, gradient_n_pal, grey_pal, hue_pal, identity_pal, identity_trans, is.trans, linetype_pal, log10_trans, log1p_trans, log2_trans, log_breaks, log_trans, logit_trans, manual_pal, math_format, muted, parse_format, percent, percent_format, pretty_breaks, probability_trans, probit_trans, reciprocal_trans, rescale, rescale_max, rescale_mid, rescale_none, rescale_pal, reverse_trans, scientific, scientific_format, seq_gradient_pal, shape_pal, show_col, sqrt_trans, squish, squish_infinite, time_trans, trans_breaks, trans_format, trans_new, trans_range, zero_range  

Además: Mensajes de aviso perdidos  
S3 methods 'fullseq.Date', 'fullseq.POSIXt', 'fullseq.numeric', 'print.trans' were declared in NAMESPACE but not found 
Error: package or namespace load failed for 'ggplot2'*

对于包BiodiversityR,错误消息以

结尾
*Error: package or namespace load failed for 'BiodiversityR'*

我尝试了几个技巧,比如重新安装,更新,加载以前的R版本,包括32位版本。

sessionInfo:  
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

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

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

other attached packages:
[1] xtable_1.7-3 reshape2_1.4 nlme_3.1-117 plyr_1.8.1  

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.4     grid_3.1.1       gtable_0.1.2
 [5] lattice_0.20-29  munsell_0.4.2    proto_0.3-10     Rcpp_0.11.1     
 [9] stringr_0.6.2    tools_3.1.1  

    packageVersion("ggplot2")
[1] '1.0.0'

2 个答案:

答案 0 :(得分:0)

实际上,必须更新一个或多个dependend包。

我创建了一个新的空库目录,我重新安装了所有包,这解决了这个问题。谢谢!

我的错误是只更新了ggplot2 update.packages("ggplot2"),而我应该运行update.packages()

答案 1 :(得分:0)

我经常发现只是因为某些原因重试require()的工作原理: require(BiodiversityR)