0

I am fairly new to R. I have tried to google my question, and tried a few things, to no avail.

I am working on a MAC * High Sierra version 10.13.5 I am working with R * R version 3.5.0 (2018-04-23) -- "Joy in Playing"

I am unable to install the package "gtools", and I don't know what to do to make it work??

install.packages("gtools", type="source")

Warning: unable to access index for repository https://mirrors.sorengard.com/cran/src/contrib:
  cannot open URL 'https://mirrors.sorengard.com/cran/src/contrib/PACKAGES'
Warning message:
package ‘gtools’ is not available (for R version 3.5.0) 

I have also tried to install from a file saved on my computer, but this did not work either

library(gtools)
Error: package or namespace load failed for ‘gtools’:
 package ‘gtools’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Saurabh Chauhan
  • 3,161
  • 2
  • 19
  • 46
Julie
  • 1
  • 1
  • 1
  • Do you have internet connection? – patL Jun 19 '18 at 14:25
  • Try removing the `type = "source"` flag – zlipp Jun 19 '18 at 14:32
  • 2
    Possible duplicate of [How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?](https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa) – divibisan Jun 19 '18 at 14:34

2 Answers2

1

You could try specifying a specific repository, for example:

install.packages("gtools", repos="https://cran.rstudio.com/")
willgordon
  • 11
  • 2
0

Why are you using install from source? typically to install a package u only need to use the command

install.packages("gtools") 

Then it will automatically ask u for a mirror to download from. It seems like "gtools" is available for R 3.5, so try to download it from another mirror and it should work.

Tuco
  • 116
  • 9