Problem installing packages on r 3.5.1 running on mac (OS X 10.13 Sierra)

Hi,

I'm new to R, because we're using it at Uni, and I'm having problems installing Rcdmr.

I've downloaded R 3.5.1. as well as XQuarts and the other tools CRAN told me to download, and I've even followed the step-by-step instructions (R Commander Installation) written by John Fox himself, but I'm getting error an error message I don't understand:

install.packages("Rcmdr")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.5/Rcmdr_2.5-1.tgz'
Content type 'application/x-gzip' length 5014770 bytes (4.8 MB)
==================================================
downloaded 4.8 MB

The downloaded binary packages are in
/var/folders/5t/qh9jqrv550l_yjc6ly3l6d2c0000gn/T//RtmpaCDkGF/downloaded_packages

What does it mean?

I also tried installing the library after the step described above, but then I'm getting this message instead:

library(Rcmdr)
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: carData
Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘data.table’
Error: package ‘car’ could not be loaded

As far as I can surmise, in the first step, Rcmdr is put in some weird folder which then creates the error "package 'car' could not be loaded".

All of this is essentially me saying "HELP". And before you suggest I go to my professor, I've already done that, and he couldn't help me either. Just made comments about how Mac computers are stupid, essentially. So I need your help, Internet!

Sincerely,
A complete R newbie who just wants to use it for his statistics class

First thing first, you'll need to install this package (with install.package("data.table") ).

Second, your installation of Rcmdr went fine from what I can tell. The way it's done is that first binary package is downloaded into this temporary folder with weird names and then installed from there. Since you didn't get any error while installing it, it means that it went through. When you load the package it checks more things and as you can see, one of those checks fails with (IMHO) informative error. With time those things will become more obvious.

3 Likes

And by the way, I'm not sure this comment is correct. As far as I can tell, this has nothing to do with Mac (or any OS, for that matter).

1 Like

Hi, I desperately need help with Rcmdr installing. I've followed your indications, I've installed the package called "data.table" as follows:

install.packages("data.table")

  There is a binary version available but the source version
  is later:
           binary source needs_compilation
data.table 1.11.4 1.11.6              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘data.table’

provo con l'URL 'https://cran.rstudio.com/src/contrib/data.table_1.11.6.tar.gz'
Content type 'application/x-gzip' length 3307259 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

* installing *source* package ‘data.table’ ...
** package ‘data.table’ successfully unpacked and MD5 sums checked
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include  -fopenmp -fPIC  -Wall -g -O2  -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/data.table’
Warning in install.packages :
  installation of package ‘data.table’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/0b/7z175tnx5y760n_x9cyccyl80000gn/T/RtmpsuXba5/downloaded_packages’

Then I tried to load Rcmdr and again the following message:

Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘data.table’
Errore: package ‘car’ could not be loaded

what I have to do? Thank you so much
Ps I'm italian, "provo" stands for "trying" and "errore" stands for "error"

Hi @Berta!

The attempt to install data.table failed due to a problem compiling the package from source. Before trying to fix that, though, you might try installing the binary (already compiled) version that's available — it's not that much older than the source version. To try this, run:

install.packages("data.table", type = "binary")

Then see if you can load Rcmdr. Does that work?

1 Like

Terrific! Thank you kindly

A post was split to a new topic: package ‘zip’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

Hi, I have the same issue but installing teh binary package is not working. Three pf my other colleagues having Macs have also tried and still not working. Any other ideas? (our lecturer tried for 2 days but still with no luck)

Could you post the error message that you're getting? Also, what are your versions of R, Rstudio and Mac OS?