1

I need to use R 3.3.3 for SPSS Modeler 18.1. I am unable to install any packages in this version of R.

I have a version of R 3.5.1 and am successfully using it with RStudio. I need to use R 3.3.3 for SPSS Modeler 18.1. I am unable to install any packages. I tried update.packages(), install.packages with type="source" or "both", tried devtools, but can't install devtools either. I believe there's a binary and source mismatch that needs_compilation, but can't seem to figure out how to fix it. This is happening for every package I can think of that I normally use: dplyr, tidyverse, ggplot2, forecast, etc etc.

install.packages('dplyr')
library('dplyr')
install.packages('pillar')
install.packages('devtools')

> install.packages('dplyr')
also installing the dependency ‘rlang’


  There are binary versions available but the source versions are later:
      binary source needs_compilation
rlang  0.2.0  0.3.1              TRUE
dplyr  0.7.4  0.7.8              TRUE

  Binaries will be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB

trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/dplyr_0.7.4.zip'
Content type 'application/zip' length 2897358 bytes (2.8 MB)
downloaded 2.8 MB

package ‘rlang’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rlang’
package ‘dplyr’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘dplyr’

The downloaded binary packages are in
        C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
> library('dplyr')
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘pillar’
Error: package or namespace load failed for ‘dplyr’
> install.packages('pillar')
also installing the dependencies ‘fansi’, ‘rlang’


  There are binary versions available but the source versions are later:
       binary source needs_compilation
fansi   0.2.2  0.4.0              TRUE
rlang   0.2.0  0.3.1              TRUE
pillar  1.2.1  1.3.1             FALSE

  Binaries will be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/fansi_0.2.2.zip'
Content type 'application/zip' length 141745 bytes (138 KB)
downloaded 138 KB

trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/rlang_0.2.0.zip'
Content type 'application/zip' length 754726 bytes (737 KB)
downloaded 737 KB

package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘rlang’

The downloaded binary packages are in
        C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
installing the source package ‘pillar’

trying URL 'https://cran.mtu.edu/src/contrib/pillar_1.3.1.tar.gz'
Content type 'application/x-gzip' length 103972 bytes (101 KB)
downloaded 101 KB

ERROR: dependency 'rlang' is not available for package 'pillar'
* removing 'C:/Program Files/R/R-3.3.3/library/pillar'

The downloaded source packages are in
        ‘C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/pillar_1.3.1.tar.gz' had status 1 
2: In install.packages("pillar") :
  installation of package ‘pillar’ had non-zero exit status
> install.packages('devtools')
also installing the dependencies ‘git2r’, ‘pkgbuild’, ‘pkgload’, ‘rcmdcheck’


  There are binary versions available but the source versions are later:
          binary source needs_compilation
git2r     0.21.0 0.24.0              TRUE
rcmdcheck  1.2.1  1.3.2             FALSE
devtools  1.13.5  2.0.1             FALSE

  Binaries will be installed
Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘pkgload’
  These will not be installed
trying URL 'https://cran.mtu.edu/bin/windows/contrib/3.3/git2r_0.21.0.zip'
Content type 'application/zip' length 3022652 bytes (2.9 MB)
downloaded 2.9 MB

package ‘git2r’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages
installing the source packages ‘pkgbuild’, ‘rcmdcheck’, ‘devtools’

trying URL 'https://cran.mtu.edu/src/contrib/pkgbuild_1.0.2.tar.gz'
Content type 'application/x-gzip' length 25264 bytes (24 KB)
downloaded 24 KB

trying URL 'https://cran.mtu.edu/src/contrib/rcmdcheck_1.3.2.tar.gz'
Content type 'application/x-gzip' length 1408582 bytes (1.3 MB)
downloaded 1.3 MB

trying URL 'https://cran.mtu.edu/src/contrib/devtools_2.0.1.tar.gz'
Content type 'application/x-gzip' length 388953 bytes (379 KB)
downloaded 379 KB

* installing *source* package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'callr', details:
  call: loadNamespace(name)
  error: there is no package called 'debugme'
ERROR: lazy loading failed for package 'pkgbuild'
* removing 'C:/Program Files/R/R-3.3.3/library/pkgbuild'
ERROR: dependency 'pkgbuild' is not available for package 'rcmdcheck'
* removing 'C:/Program Files/R/R-3.3.3/library/rcmdcheck'
ERROR: dependencies 'pkgbuild', 'pkgload', 'rcmdcheck' are not available for package 'devtools'
* removing 'C:/Program Files/R/R-3.3.3/library/devtools'

The downloaded source packages are in
        ‘C:\Users\nipa.onulak\AppData\Local\Temp\Rtmpcbgyh7\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/pkgbuild_1.0.2.tar.gz' had status 1 
2: In install.packages("devtools") :
  installation of package ‘pkgbuild’ had non-zero exit status
3: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/rcmdcheck_1.3.2.tar.gz' had status 1 
4: In install.packages("devtools") :
  installation of package ‘rcmdcheck’ had non-zero exit status
5: running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.3\library" C:\Users\NIPA~1.ONU\AppData\Local\Temp\Rtmpcbgyh7/downloaded_packages/devtools_2.0.1.tar.gz' had status 1 
6: In install.packages("devtools") :
  installation of package ‘devtools’ had non-zero exit status
NPO3
  • 21
  • 1
  • 4
  • You are going to have to install older version of these packages. CRAN really only makes it easy to install the newest. You'll have to determine exactly which version number will run with the R version you have. This might help: https://stackoverflow.com/questions/28766923/how-to-determine-which-older-version-of-the-r-package-is-compatible-with-my-r-ve – MrFlick Jan 10 '19 at 20:06
  • You can install older R versions. If you're using RStudio you can change the R Version under Tools -> Global Options. – Cris Jan 10 '19 at 20:14
  • @Cris But installing older versions of R won't change how `install.packages()` works. Or are you saying RStudio does something special to change that? – MrFlick Jan 10 '19 at 20:23
  • 1
    @MrFlick you're right, it wont install the desired version of the package, but the version can be specified if the url is available. OP can use this: https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages together with changing the R Version it shouldn't have any sort of problem. – Cris Jan 10 '19 at 20:31

1 Answers1

1

@MrFlick, thank you. I was able to navigate and ended up using this site "https://www.r-bloggers.com/using-old-versions-of-r-packages/", and used a link from that post for binaries because I was having a lot of issues with that "https://cran.r-project.org/bin/windows/contrib/", and code example for package devtools: install.packages("https://cran.r-project.org/bin/windows/contrib/3.3/devtools_1.13.5.zip", repos=NULL, type="source"). It all seems to work and load the libraries :). Thank you for the direction!

NPO3
  • 21
  • 1
  • 4