User Tools

Site Tools


documentation:r_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:r_setup [2015/04/07 01:49]
schuemie
documentation:r_setup [2016/07/06 21:37]
vojtechhuser
Line 7: Line 7:
 Here are instructions for when you just want to run the OHDSI tools. Here are instructions for when you just want to run the OHDSI tools.
  
-** Windows ​**+==== Windows ​ ​==== 
  
   - Install R, which you can download from [[http://​cran.r-project.org/​bin/​windows/​base/​|CRAN]]. **Important**:​ it is best to install R in the root of your drive, so preferably in //​c:/​R/​R-3.x.x//​   - Install R, which you can download from [[http://​cran.r-project.org/​bin/​windows/​base/​|CRAN]]. **Important**:​ it is best to install R in the root of your drive, so preferably in //​c:/​R/​R-3.x.x//​
Line 16: Line 17:
             * R_LIBRARY with the location of your R library (e.g. //​c:/​users/​john/​R/​win-library/​3.1//​)             * R_LIBRARY with the location of your R library (e.g. //​c:/​users/​john/​R/​win-library/​3.1//​)
   - We found it is best to restart your computer for the environmental variables to take effect.   - We found it is best to restart your computer for the environmental variables to take effect.
-  - Several OHDSI packages require [[http://​www.java.com|Java]],​ so please install that as well.+  - Several OHDSI packages require [[http://​www.java.com|Java]],​ so please install that as well. On a 64-bit machine it is better to install the JDK rather than the JRE, since the JRE only seems to include the 32-bit version. If you have further trouble, be sure on Windows that your Path variable includes the path to jvm.dll (Windows Button --> type "​path"​ --> Edit Environmental Variables --> Edit PATH variable, add to end ;C:/Program Files/​Java/​jre/​bin/​server) or wherever it is on your system. 
 + 
 +  - additional user notes (2016-07-06,​ Vojtech Huser). After many attempts to resolve the jml.dll issue, I was able to solve the error by forcing R to not try to install the package for all architectures. If all is failing, try adding install opts like this //​install.packages("​SqlRender",​INSTALL_opts="​--no-multiarch"​)//​ 
 + 
 +==== Ubuntu ==== 
 + 
 +=== Install Java === 
 + 
 +First, we completely remove openjdk if present: 
 +<​code>​ 
 +sudo apt-get purge openjdk-\* 
 +</​code>​ 
 +Next we install Oracle Java: 
 +<​code>​ 
 +sudo apt-get install python-software-properties 
 +sudo add-apt-repository ppa:​webupd8team/​java 
 +sudo apt-get update 
 +sudo apt-get install oracle-java8-installer 
 +</​code>​ 
 + 
 +=== Install Git === 
 + 
 +<​code>​ 
 +sudo apt-get install git-all 
 +</​code>​ 
 + 
 +=== Install R === 
 + 
 +<​code>​ 
 +sudo sh -c 'echo "deb http://​cran.rstudio.com/​bin/​linux/​ubuntu trusty/"​ >> /​etc/​apt/​sources.list'​ 
 +sudo gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 
 +sudo gpg -a --export E084DAB9 | sudo apt-key add - 
 +sudo apt-get update 
 +sudo apt-get install r-base 
 +sudo R CMD javareconf 
 +</​code>​ 
 +  
 +If you're having trouble finding libjvm.so in R: 
 +<​code>​ 
 +sudo updatedb 
 +locate libjvm.so 
 +sudo ln -s  /​usr/​lib/​jvm/​java-8-oracle/​jre/​lib/​amd64/​server/​libjvm.so /usr/lib/  
 +</​code>​ 
 +(adapt last line to correct location for your JRE) 
 + 
 +=== Install required Linux packages === 
 + 
 +These libraries are required by some packages in R: 
 +<​code>​ 
 +sudo apt-get install libcurl4-openssl-dev 
 +sudo apt-get install libssl-dev 
 +sudo apt-get install libxml2-dev 
 +sudo apt-get install liblzma-dev 
 +</​code>​ 
  
 ===== Tool developers ===== ===== Tool developers =====
documentation/r_setup.txt · Last modified: 2016/07/06 21:37 by vojtechhuser