Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi' [duplicate]

When I use

library(Hmisc)

I get the following error

    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi'
    Error: package 'ggplot2' could not be loaded

As well, if I use

library(ggplot2)

I get the following error

    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi'
    Error: package or namespace load failed for 'ggplot2'

I've tryed to install 'stringi' install.packages("stringi")

But at some point, during the installation, I get the following error message:

    configure: error: in `/private/var/folders/pr/wdr5dvjj24bb4wwnjpg1hndc0000gr/T/RtmpeQ5pXk/R.INSTALL10b94a012cab/stringi':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    ERROR: configuration failed for package 'stringi'
    * removing '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringi'

I'm using RStudio (Version 0.99.447) and I have R version 3.2.1.

like image 498
Marta Avatar asked Jun 22 '15 14:06

Marta


2 Answers

Use this:

install.packages("package_name", repos=c("http://rstudio.org/_packages",
"http://cran.rstudio.com",dependencies=TRUE))

This works as it assigns from where to download the package.

like image 99
sanket chaure Avatar answered Nov 16 '22 06:11

sanket chaure


I got this error while trying to load the swirl package.

You can try to re install the package directly from cran and include an argument to ensure all the dependant packages are included.

install.packages("swirl", repos="http://cran.rstudio.com/", dependencies=TRUE)
like image 30
Kimberly Gonzales Avatar answered Nov 16 '22 05:11

Kimberly Gonzales