blob: a8fb63f67eff6bcb3ee8bdeb8c6f3e55491a41b5 [file] [log] [blame]
Austin Schuh9049e202022-02-20 17:34:16 -08001R
2======
3
4Binaries
5--------
6
7A 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
15The pre-compiled binaries can also be downloaded `directly from the CRAN server
16<https://cran.r-project.org/web/packages/osqp/>`_.
17
18From Sources
19------------
20
21If 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
29From Sources (within R)
30-----------------------
31
32If 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
40Note that the second line above is necessary because the "remotes" package in R does not currently support recursive cloning of git submodules.