| 31 | | ... |
| | 35 | * [wiki:TolR#InstallTOL Install TOL] |
| | 36 | * [wiki:TolR#InstallR Install R] |
| | 37 | * [wiki:TolR#Rpackages R packages] |
| | 38 | * [wiki:TolR#TOLpacakges TOL packages] |
| | 39 | |
| | 40 | === Install TOL === |
| | 41 | |
| | 42 | Install TOL (GNU-GCC compiled) version 3.3 onwards (if you have not already done so). See [wiki:Download]. |
| | 43 | |
| | 44 | ==== Environment variables (for Windows) ==== |
| | 45 | |
| | 46 | For the communication with TOL from R is necessary the environment variable '''{{{TOLGNU_ROOT}}}''' ({{{TOLGNU_ROOT_64}}} for TOL 64-bits) containing the TOL 'installation' folder. |
| | 47 | |
| | 48 | * TOL 'installation' folder: [[BR]] {{{%PROGRAMFILES%\Tol-Project\tol-gnu-v3.3}}} [[BR]] ('program files' folder and version number may be different). |
| | 49 | |
| | 50 | This environment variable is automatically generated during the installation process. |
| | 51 | |
| | 52 | === Install R === |
| | 53 | |
| | 54 | Install the statistical software R. See [https://www.r-project.org]. |
| | 55 | |
| | 56 | It is recommended R version 3.2 onwards. Specifically R version 3.2.0 has been tried and successfully tested: |
| | 57 | [https://cran.r-project.org/bin/windows/base/old/3.2.0 R 3.2.0] |
| | 58 | |
| | 59 | If you use TOL 32-bits, you must install (at least) the R 32-bits version. |
| | 60 | |
| | 61 | ==== Environment variables (for Windows) ==== |
| | 62 | |
| | 63 | TOL (for Windows) needs an environment variable named '''{{{R_HOME}}}''' containing the R 'installation' folder. [[BR]] |
| | 64 | * R 'installation' folder: [[BR]] {{{%PROGRAMFILES%\R\R-3.2.0}}} [[BR]] (version number may be different) |
| | 65 | |
| | 66 | For example: |
| | 67 | {{{ |
| | 68 | SETX R_HOME %PROGRAMFILES%\R\R-3.2.0 |
| | 69 | }}} |
| | 70 | |
| | 71 | Is is also recommended, add R bin folder to the environment variable '''{{{PATH}}}'''. This allows some TOL packages (builded before TOL+R) to find R. To do that, you should ensure that the R 'bin' folder is in the environment variable PATH. |
| | 72 | |
| | 73 | * R 'bin' folder: [[BR]] {{{%PROGRAMFILES%\R\R-3.2.0\bin}}} [[BR]] (version number may be different) |
| | 74 | |
| | 75 | You can edit the environment variable PATH as usual. For example: |
| | 76 | {{{ |
| | 77 | SETX PATH %PATH%;%PROGRAMFILES%\R\R-3.2.0 |
| | 78 | }}} |
| | 79 | |
| | 80 | === R packages === |
| | 81 | |
| | 82 | There are two sets of R-packages used from TOL: |
| | 83 | |
| | 84 | 1. The R-packages that TOL uses traditionally from the command line. [[BR]] |
| | 85 | See: [wiki:Installation#InstallsomeR-packages Install some R-packages]. |
| | 86 | |
| | 87 | 2. The R-packages needed to use TOL from R. [[BR]] |
| | 88 | See: [wiki:Rprojects#Installation Rprojects:Installation]. |
| | 89 | |
| | 90 | Altogether: |
| | 91 | {{{ |
| | 92 | #!ruby |
| | 93 | # 1st set |
| | 94 | install.packages("quadprog") |
| | 95 | install.packages("coda") # imports: lattice |
| | 96 | install.packages("mcgibbsit") # depends: coda |
| | 97 | install.packages("slam") |
| | 98 | install.packages("Rglpk") # depends: slam |
| | 99 | # 2nd set |
| | 100 | install.packages("lubridate") |
| | 101 | install.packages("polynom") |
| | 102 | install.packages("base64enc") |
| | 103 | # TOL Project developed |
| | 104 | install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolBasis_1.1.zip", repos=NULL, type="binary") |
| | 105 | install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolRlink_1.0.zip", repos=NULL, type="binary") |
| | 106 | install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolKit_1.1.zip", repos=NULL, type="binary") |
| | 107 | }}} |
| | 108 | |
| | 109 | === TOL packages === |
| | 110 | |
| | 111 | For the communication from TOL with R there is an only specific package: [wiki:TolRInside]. This can be installed and loaded as usual: |
| | 112 | {{{ |
| | 113 | #!cpp |
| | 114 | #Require TolRInside; |
| | 115 | }}} |