2017-08-30 341 views
1

我想安装R的软件包lubridate,但我总是有相同的错误消息。 环顾它看起来与它有一个函数date()已经存在 也作为base :: date()的事实有关。但是在测试包期间,它会调用date()并因此导致错误。R lubridate软件包安装 - 错误as.POSIXlt

在这里我得到什么:

install.packages("lubridate") 
Installing package into ‘/home/user/R/i586-pc-linux-gnu-library/3.3’ 
(as ‘lib’ is unspecified) 
trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.6.0.tar.gz' 
Content type 'unknown' length 317672 bytes (310 KB) 
================================================== 
downloaded 310 KB 

* installing *source* package ‘lubridate’ ... 
** package ‘lubridate’ successfully unpacked and MD5 sums checked 
** libs 
installing to /home/user/R/i586-pc-linux-gnu-library/3.3/lubridate/libs 
** R 
** data 
*** moving datasets to lazyload DB 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** installing vignettes 
** testing if installed package can be loaded 
Error in as.POSIXlt(x, tz = tz(x)) : 
    argument "x" is missing, with no default 
Calls: .Last -> cat -> paste -> date -> date.default -> as.POSIXlt 
Execution halted 
ERROR: loading failed 
* removing ‘/home/user/R/i586-pc-linux-gnu-library/3.3/lubridate’ 
Warning in install.packages : 
    installation of package ‘lubridate’ had non-zero exit status 

The downloaded source packages are in 
    ‘/tmp/RtmpuzZ3SK/downloaded_packages’ 

这里我sessionInfo():

sessionInfo() 
R version 3.3.3 (2017-03-06) 
Platform: i586-pc-linux-gnu (32-bit) 
Running under: Debian GNU/Linux 8 (jessie) 

locale: 
[1] LC_CTYPE=en_GB.UTF-8  LC_NUMERIC=C    
[3] LC_TIME=en_GB.UTF-8  LC_COLLATE=en_GB.UTF-8  
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 
[7] LC_PAPER=en_GB.UTF-8  LC_NAME=C     
[9] LC_ADDRESS=C    LC_TELEPHONE=C    
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C  

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

loaded via a namespace (and not attached): 
[1] tools_3.3.3 

任何想法如何避免这个问题?

回答