Trouble downloading "blotter" and "quantstrat" packages

Hey everyone, I'm having so much trouble with the same thing. The bug fix worked at least!

find_rtools() # is TRUE now
[1] TRUE

Still I am having trouble downloading two packages I really need... "blotter" and "quantstrat".

I have a 3.5.1 version of R with Rtools 35 installed. Can anyone help me please?

Thanks,
Jonathan

What' happens when you try to install these packages? Specific error messages and/or reprex would be helpful.

Here's my output of error messages when downlading blotter.

devtools::install_github("braverock/blotter")

Downloading GitHub repo braverock/blotter@master
from URL https://api.github.com/repos/braverock/blotter/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.4,3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installing blotter
"C:/Users/JWILLI~1/DOWNLO~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ
--no-save --no-restore --quiet CMD INSTALL
"C:/Users/jwilliams/AppData/Local/temp/RtmpiIPxpQ/devtoolsd202f7c5bdd/braverock-blotter-bc75cf5"
--library="C:/Users/jwilliams/Downloads/R/R-3.5.1/library" --install-tests

  • installing source package 'blotter' ...
    ** libs

*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'blotter'

  • removing 'C:/Users/jwilliams/Downloads/R/R-3.5.1/library/blotter'
    In R CMD INSTALL
    Installation failed: Command failed (1)

I'm focusing on the blotter package first because it is a dependency for quantstrat.

uninstall your existing Rtools and then reinstall the latest. My suspicion is that something is borked with your rtools install:

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

Ok I just uninstalled all the different Rtools and then reinstalled RTools35

I still get the same error messages. Any other ideas?

devtools::install_github("braverock/blotter")

Downloading GitHub repo braverock/blotter@master
from URL https://api.github.com/repos/braverock/blotter/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.4,3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installing blotter
"C:/Users/JWILLI~1/DOWNLO~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ
--no-save --no-restore --quiet CMD INSTALL
"C:/Users/jwilliams/AppData/Local/temp/RtmpiIPxpQ/devtoolsd207b5e2c31/braverock-blotter-bc75cf5"
--library="C:/Users/jwilliams/Downloads/R/R-3.5.1/library" --install-tests

  • installing source package 'blotter' ...
    ** libs

*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'blotter'

  • removing 'C:/Users/jwilliams/Downloads/R/R-3.5.1/library/blotter'
    In R CMD INSTALL
    Installation failed: Command failed (1)

hmmm.. can you run the following and show us your path:

Sys.getenv('PATH')

also, do you know what directory you installed R tools in?

Sure. My Rtools package is installed in the C:/ drive

Sys.getenv('PATH')
[1] "C:\Users\jwilliams\Downloads\R\R-3.5.1\bin\x64;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT"

it seems your path does not include the path to the RTools install. From what I read on other threads, you may need to tick a box on the install that adds your rtools install path to the system path.

I saw something about that. That option to add rtools install path to the system path is only available in Rtools34 and under to my knowledge. Rtools35 didn't give me the option when I installed it.

What you said makes sense though:
"it seems your path does not include the path to the RTools install"

Maybe since my working directory is C:/Users/jwilliams/Downlads that has something to do with it.

I need everything to go to C:/Rtools instead.

Any ideas?

you could manually add "C:/Rtools" to your path.

How do I do that? I think someone did something similar in this example:

# Set path of Rtools 
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "*InstallDirectory*/Rtools/bin/", "*InstallDirectory*/Rtools/mingw_64/bin", sep = ";")) 

#for 64 bit version 
Sys.setenv(BINPREF = "*InstallDirectory*/Rtools/mingw_64/bin") 
library(devtools) 

#Manually "force" version to be accepted 
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools") 
find_rtools() # is TRUE now