2017-08-30 255 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 

任何想法如何避免這個問題?

回答