Unable to load package in R

Since yesterday I can’t download some common packages used, for example. reshape2and stringrthrough the library team.

Step to reproduce my problem:

1) Start a new session on the Rstudio server (version 0.99.467). I also kill active sessions on the Rstudio server.

2) Run these codes

library(ggplot2)
library(stringr)

3) Get an error message:

Error in unloadNamespace (package): namespace 'stringr is imported' reshape2, so you cannot upload Show trace

Repeat with Debug

Error in library (stringr): "stringr" version 0.6.2 could not be unloaded.

But I do not get an error if stringrloading up to ggplot2. How do I fix this problem. Thanks for any suggestions.

I may have to upgrade R to 3.2

R-:

R version 3.1.3 (2015-03-09)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)

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

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

other attached packages:
[1] ggplot2_1.0.0

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.4     grid_3.1.3       gtable_0.1.2     MASS_7.3-39      munsell_0.4.2    plyr_1.8.1      
 [8] proto_0.3-10     Rcpp_0.11.2      reshape2_1.4     scales_0.2.4     stringr_0.6.2    tools_3.1.3    
+4
2

, R R.

, stringr reshape2, ( ). R .

+2

, R , . - .libPaths(). .libPaths("C:/Program Files/R/R-3.4.3patched/library") . , . :

> .libPaths()

[1] "L:/My Documents/R/win-library/3.4"         "C:/Program Files/R/R-3.4.3patched/library"

> .libPaths("C:/Program Files/R/R-3.4.3patched/library")

> packages<-c('ggplot2','data.table','knitr','xtable')

> install.packages(packages)
> lapply(packages,library,character.only=T)

, , , -.

0

Source: https://habr.com/ru/post/1614663/


All Articles