0

I am trying to install the package MGDrivE from its source *tar.gz file (MGDrivE_1.1.0.tar.gz) as found on CRAN. Ultimately I am trying to edit the functions in the directory that is created by unzipping the *tar.gz file, but I want to make sure that I can install these packages from a source first.

I am using Windows 10. My PATH currently is:

C:\Rtools\bin\;C:\RBuildTools\3.5\bin\;C:\Rtools\mingw_64\bin\;C:\Program Files\Microsoft MPI\Bin\;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;

Here is what I have tried:

install.packages("C:/Rpackages/MGDrive/MGDrivE_1.1.0.tar.gz", repos = NULL)

Which resulted in this warning and no installed package:

Installing package into ‘C:/Users/browne40/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'MGDrivE' ...
** package 'MGDrivE' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
C:\Rtools\mingw_64\bin\g++  -I"C:/PROGRA~1/R/R-36~1.1/include" -DNDEBUG  -I"C:/Users/browne40/Documents/R/win-library/3.6/Rcpp/include"        -O2 -Wall  -mtune=generic -c MGDrivE-Auxilary.cpp -o MGDrivE-Auxilary.o
sh: C:Rtoolsmingw_64bing++: command not found
make: *** [C:/PROGRA~1/R/R-36~1.1/etc/i386/Makeconf:215: MGDrivE-Auxilary.o] Error 127
ERROR: compilation failed for package 'MGDrivE'
* removing 'C:/Users/browne40/Documents/R/win-library/3.6/MGDrivE'
Warning in install.packages :
  installation of package ‘U:/Thesis/Mouse/Mouse_GD/MGDrive_Test/MGDrev/MGDrivE_1.1.0.tar.gz’ had non-zero exit status
  • Generally what you are doing looks fine to me. `make Error 127` indicates that something went wrong while compiling something in the package. That's hard to debug in my experience and it usually makes more sense to try and get a binary (where everything is already compiled for your architecture). The package `MGDrivE` is on CRAN btw – JBGruber Jan 28 '20 at 22:37
  • Where is the `type="source"` in your arguments to install.packages? The default type in Windoze is 'winbinary'. And are you sure you have a current version of Rtools and you are doing everything with the same "bitness"? These days it's somewhat worrisome to see "arch - i386" mixed with "mingw_64" – IRTFM Jan 29 '20 at 06:12

1 Answers1

0

Figured it out! It turns out that I did not check all the boxes when installing RTools. So the steps were: 1. install RTools and check all boxes when you're asked what components you want to install

  1. Make sure that RTools and R are in your system path. Mine looks like C:\Rtools\bin;"C:\Program Files\R\R-3.6.1\bin" (make sure they are in this order)