2

I have just updated R to version 3.1.2, and many packages seem not yet available, such as RmySQL.

What can I do? Uninstall the latest version of R and go back to version 3.0? Or are there other ways?

Joris Meys
  • 106,551
  • 31
  • 221
  • 263
Kasper Van Lombeek
  • 623
  • 1
  • 7
  • 17
  • You don't specify your OS. –  Nov 25 '14 at 12:35
  • If using Rstudio then you can choose which version of R to use, https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R – zx8754 Nov 25 '14 at 12:43
  • `install.packages('RMySQL')` works for me without any problems (R 3.1.2, Ubuntu 14.04, 64bit). Please be more concise about your problem. – EDi Nov 25 '14 at 13:32
  • 1
    My OS is OS X version 10.9.2, and I am having the same problem with the packages Rgeos and PlotGoogleMaps – Kasper Van Lombeek Nov 25 '14 at 13:55

1 Answers1

2

The problem is especially related to Apple, although for some packages (eg RMySQL) this problem can occur in Windows as well.

On Apple, you can try to install from source:

install.packages('plotGoogleMaps', type='source')

Note that with RMySQL you also have to make sure your environment variables are set correctly. You find more info on the installation procedure on their CRAN page.

On Windows, you need to install Rtools before you can install from source:

http://cran.r-project.org/bin/windows/Rtools/

After you've done that, you can use the same option as above.

Be warned though that building from source might require a manual configuration of your system. This is the case for both rgeos and RMySQL. Information on these procedures can be found on the CRAN page of either package:

eg for rgeos you need to preinstall GEOS as specified in the system requirements: http://cran.r-project.org/web/packages/rgeos/index.html

For RMySQL you need to set up yor environment variables, as specified here: http://cran.r-project.org/web/packages/RMySQL/INSTALL

EDIT: Building on MAC

If you want to build binary packages on Mac machines, you need to take into account that you might need extra tools, especially when these packages contain compiled code. This is explained in more detail in the R FAQ for Mac and the Administration and Installation manual:

http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages

http://cran.r-project.org/doc/manuals/r-release/R-admin.html#OS-X

Alternatively, you might want to check the R for MAC's Developer page at http://r.research.att.com/ This one contains more information on the toolchain you need.

Joris Meys
  • 106,551
  • 31
  • 221
  • 263