{{{ #!comment }}} {{{ #!div style="width:15%; float:left; clear:none; margin-right:1em; background:#ffb; border:1px solid #b00; padding-left:1em; padding-right:1em" [wiki:WikiStart Home] [[BR]] [[BR]] '''TOL''' [[BR]] [wiki:Software Software] [[BR]] [wiki:Download Download] [[BR]] [wiki:Installation Installation] [[BR]] [wiki:Packages Packages] [[BR]] [wiki:OTAN OTAN] [[BR]] [[BR]] '''TOL Project''' [[BR]] [wiki:About About TOL] [[BR]] [wiki:Manuals Manuals] [[BR]] [wiki:Development Development] [[BR]] [wiki:Rprojects R-Projects] [[BR]] [[BR]] '''Other Links''' [[BR]] [wiki:TracGuide Trac Guide] [[BR]] [wiki:WikiTree Wiki Tree] [[BR]] [https://mms.tol-project.org MMS] }}} {{{ #!div style="margin-left:20%; margin-right:20%; padding-left:2em; padding-right:2em" {{{ #!comment }}} = TOL+R = From TOL 3.3 onwards, TOL provides a natural communication with R. Two packages allow us to do than ([wiki:tolRlink] for R) and ([wiki:TolRInside] for TOL). The title '''TOL+R''' represents this set of developments that allows the integration of R in TOL and viceversa. To take advantage of these functionalities is necessary to perform a proper installation. See below for more details. == Installation == TOL+R requires, besides the both softwares: TOL and R, some additional packages or libraries. Follow the instrucctions below: * [wiki:TolR#InstallTOL Install TOL] * [wiki:TolR#InstallR Install R] * [wiki:TolR#Rpackages R packages] * [wiki:TolR#TOLpacakges TOL packages] === Install TOL === Install TOL (GNU-GCC compiled) version 3.3 onwards (if you have not already done so). See [wiki:Download]. ==== Environment variables (for Windows) ==== 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. * TOL 'installation' folder: [[BR]] {{{%PROGRAMFILES%\Tol-Project\tol-gnu-v3.3}}} [[BR]] ('program files' folder and version number may be different). This environment variable is automatically generated during the installation process. === Install R === Install the statistical software R. See [https://www.r-project.org]. It is recommended R version 3.2 onwards. Specifically R version 3.2.0 has been tried and successfully tested: [https://cran.r-project.org/bin/windows/base/old/3.2.0 R 3.2.0] If you use TOL 32-bits, you must install (at least) the R 32-bits version. ==== Environment variables (for Windows) ==== TOL (for Windows) needs an environment variable named '''{{{R_HOME}}}''' containing the R 'installation' folder. [[BR]] * R 'installation' folder: [[BR]] {{{%PROGRAMFILES%\R\R-3.2.0}}} [[BR]] (version number may be different) For example: {{{ SETX R_HOME %PROGRAMFILES%\R\R-3.2.0 }}} 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. * R 'bin' folder: [[BR]] {{{%PROGRAMFILES%\R\R-3.2.0\bin}}} [[BR]] (version number may be different) You can edit the environment variable PATH as usual. For example: {{{ SETX PATH %PATH%;%PROGRAMFILES%\R\R-3.2.0 }}} === R packages === There are two sets of R-packages used from TOL: 1. The R-packages that TOL uses traditionally from the command line. [[BR]] See: [wiki:Installation#InstallsomeR-packages Install some R-packages]. 2. The R-packages needed to use TOL from R. [[BR]] See: [wiki:Rprojects#Installation Rprojects:Installation]. Altogether: {{{ #!ruby # 1st set install.packages("quadprog") install.packages("coda") # imports: lattice install.packages("mcgibbsit") # depends: coda install.packages("slam") install.packages("Rglpk") # depends: slam # 2nd set install.packages("lubridate") install.packages("polynom") install.packages("base64enc") # TOL Project developed install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolBasis_1.1.zip", repos=NULL, type="binary") install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolRlink_1.1.zip", repos=NULL, type="binary") install.packages("https://www.tol-project.org/svn/tolp/Rprojects/tolKit_1.2.zip", repos=NULL, type="binary") }}} === TOL packages === For the communication from TOL with R there is an only specific package: [wiki:TolRInside]. This can be installed and loaded as usual: {{{ #!cpp #Require TolRInside; }}}