Error downloading dplyr

I still forget it and stare into space for a half hour every time it happens. :slight_smile:

Thank you! You are all so kind and helpful - been staring into space for well over an hour! :wink:

About every other Mac OS update seems to break and not attempt to refigure things relative to C++ toolchains. Mojave was especially brutal. Not criticizing the Mac here (I love macs), just saying.

xcode is almost always the fix.

1 Like

I'm still getting the same error :frowning:

The downloaded source packages are in
‘/private/var/folders/yq/1q1qc8g952vd68jyw6z1jxyr0000gn/T/RtmpmWRxnG/downloaded_packages’

Error in library(ggplot2) : there is no package called ‘ggplot2’

Has this package been discontinued? Does anyone know what I can replace it with if so?
Sorry to be such a novice!
(also - anyone know of a good tutor or course? I'm desperate!)

Have you installed ggplot2 since you installed xcode?

I have tried and get the error showing :frowning:
Do you want to install from sources the packages which need compilation?
y/n: y
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘fansi’
Do you want to attempt to install these from sources?
y/n: y

Then the same error...

When you say "the same error" which do you mean? If you could paste the output of the installation, as you did in the original post, it would be helpful.

Also, I understand that this might not be possible if you're in a corporate environment, but have you considered updating your version of R (not RStudio)? It looks like you're using 3.3.*, and the latest version is 3.5.3.

Thank you, Mara. I will try and update it now.
I also keep getting the error:

Warning in install.packages :
package ‘ggplot’ is not available (for R version 3.3.2)

I'm so confused - I just ran this code a few days ago and it was all fine :frowning:

I am still not able to run plyr or dplyr or ggplot (these are pretty much the only packages I know how to use!) see below... Do I need to do something about the last line... where it says where the packages are?

R version 3.5.3 (2019-03-11) -- "Great Truth"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

> Help > Check for Updates
Error: unexpected 'for' in "Help > Check for"
> help("Check for Updates")
No documentation for ‘Check for Updates’ in specified packages and libraries:
you could try ‘??Check for Updates’
> '??Check for Updates'
[1] "??Check for Updates"
> rm(list = ls())
> source("~/Box Sync/FITriMS Study/R-FITriMS/Helpers.R")
Error: package or namespace load failed for ‘plyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘Rcpp’
> try(detach("package:dplyr"), silent = TRUE)
> library(plyr)
Error: package or namespace load failed for ‘plyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘Rcpp’
> install.packages("plyr")
also installing the dependency ‘Rcpp’

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/Rcpp_1.0.0.tgz'
Content type 'application/x-gzip' length 4535632 bytes (4.3 MB)
==================================================
downloaded 4.3 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/plyr_1.8.4.tgz'
Content type 'application/x-gzip' length 946407 bytes (924 KB)
==================================================
downloaded 924 KB


The downloaded binary packages are in
	/var/folders/yq/1q1qc8g952vd68jyw6z1jxyr0000gn/T//RtmprLSpm4/downloaded_packages

You are showing everything but the relevant error message, what is the whole output of running this command?

install.packages("Rcpp")

install.packages("Rcpp")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/Rcpp_1.0.0.tgz'
Content type 'application/x-gzip' length 4535632 bytes (4.3 MB)

downloaded 4.3 MB

The downloaded binary packages are in
/var/folders/yq/1q1qc8g952vd68jyw6z1jxyr0000gn/T//RtmpUFmAHl/downloaded_packages

And then I also get this:

library(reshape2)
Error: package or namespace load failed for ‘reshape2’ in library.dynam(lib, package, package.lib):
shared object ‘stringi.so’ not found
find.package("reshape2")
[1] "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/reshape2"
library("reshape2")
Error: package or namespace load failed for ‘reshape2’ in library.dynam(lib, package, package.lib):
shared object ‘stringi.so’ not found
library("reshape2", lib.loc="/Library/Frameworks/R.framework/Versions/3.5/Resources/library")
Error: package or namespace load failed for ‘reshape2’ in library.dynam(lib, package, package.lib):
shared object ‘stringi.so’ not found

Im so confused as to why my RStudio suddenly doesn't work?

Have you recently updated to R >= 3.5 from R <= 3.4.X?
If that is the case then you will need to reinstall all your packages under the new R version.

I did update - and I am trying to reinstall, but I get the error:

install.packages("reshape2")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/reshape2_1.4.3.tgz'
Content type 'application/x-gzip' length 286207 bytes (279 KB)
==================================================
downloaded 279 KB

The downloaded binary packages are in
/var/folders/yq/1q1qc8g952vd68jyw6z1jxyr0000gn/T//RtmpUFmAHl/downloaded_packages

library("reshape2")
Error: package or namespace load failed for ‘reshape2’ in library.dynam(lib, package, package.lib):
shared object ‘stringi.so’ not found

This has never happened to me before. Is it due to the update? am I doing something fundamentally wrong?

Yes, it is, your problem is that you are trying to install over the old packages and that is causing conflicts, you need to start all over by un install R deleting the library folder and making a new clean installation.

1 Like

Thank you- I will try this now!

3 posts were split to a new topic: Error: package or namespace load failed for ‘...’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 0.3.0.1 is already loaded, but >= >= 0.3.1 is required

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.