install quantstrat for R latest R version ()

10,551

Solution 1

Because quantstrat build-fail at R-Forge, you can't get the pre-build file(.tar.gz). You can get the code from github and build by yourself.

install.packages("devtools")
require(devtools)
install_github("braverock/blotter") # dependency
install_github("braverock/quantstrat")

Solution 2

Can you provide the installation code that produced that error message? Are you trying to install it from CRAN?

That doesn't appear possible.

  1. A post from 2014 states it's not on CRAN

    quantstrat is a R package ... still under heavy development and can’t be installed from CRAN yet. You can install it from source and the process is straightforward.

  2. It's not on the current list of available CRAN packages

It's R-Forge page states the current version 'Failed to build'.

You could download the previous version (and its dependency) from R-Forge at

(or get the Linux tar.gz files). Assuming they're saved in your personal Downloads folder, install it in R with

install.packages("~/Downloads/blotter_0.9.1741.zip", repos = NULL)
install.packages("~/Downloads/quantstrat_0.9.1739.zip", repos = NULL)

According to that first link, you'll need to install these prereqs first, if they're not already:

install.packages("FinancialInstrument")
install.packages("PerformanceAnalytics")
install.packages("foreach")

Edit: see the comment below from @brian-g-peterson for how the current deployment avenue uses GitHub. https://github.com/braverock/quantstrat

Share:
10,551
jonas
Author by

jonas

Updated on July 05, 2022

Comments

  • jonas
    jonas almost 2 years

    I would like to install a package when using the latest R version in RStudio. In particular the quantstrat package Is that possible?

    This is the R latest version I have 3.4.1

    my error message:

    Warning in install.packages :
      package ‘quantstrat’ is not available (for R version 3.4.1)