Austin Schuh | 9049e20 | 2022-02-20 17:34:16 -0800 | [diff] [blame^] | 1 | R |
| 2 | ====== |
| 3 | |
| 4 | Binaries |
| 5 | -------- |
| 6 | |
| 7 | A pre-compiled version of the OSQP R interface can be installed directly from within R. Note that this will install the OSQP interface from the current CRAN repository, which may not be the most up-to-date version: |
| 8 | |
| 9 | .. code:: r |
| 10 | |
| 11 | install.packages("osqp") |
| 12 | |
| 13 | |
| 14 | |
| 15 | The pre-compiled binaries can also be downloaded `directly from the CRAN server |
| 16 | <https://cran.r-project.org/web/packages/osqp/>`_. |
| 17 | |
| 18 | From Sources |
| 19 | ------------ |
| 20 | |
| 21 | If you would like to use the most recent version of OSQP-R and have access to git on your machine along with a suitable compiler, then you can do the following from within a terminal: |
| 22 | |
| 23 | .. code:: r |
| 24 | |
| 25 | git clone --recursive https://github.com/osqp/osqp-r.git |
| 26 | cd osqp-r |
| 27 | R CMD install . |
| 28 | |
| 29 | From Sources (within R) |
| 30 | ----------------------- |
| 31 | |
| 32 | If you would like to install the latest version directly from with R (e.g.\ because you do not have ``git`` installed) and have a suitable compiler, then you can do the following from within R: |
| 33 | |
| 34 | .. code:: r |
| 35 | |
| 36 | install.packages("remotes") |
| 37 | remotes::install_github("r-lib/remotes#103") |
| 38 | remotes::install_git("git://github.com/OxfordControl/osqp-r",submodules = TRUE) |
| 39 | |
| 40 | Note that the second line above is necessary because the "remotes" package in R does not currently support recursive cloning of git submodules. |