User Tools

Site Tools


documentation:r_setup

This is an old revision of the document!


How to set up your R environment

Many of the OHDSI tools need to be executed from within R, and it is not always that easy to configure it correctly. Below are our recommendations for various use cases.

Tool users

Here are instructions for when you just want to run the OHDSI tools.

Windows

  1. Install R, which you can download from CRAN. Important: it is best to install R in the root of your drive, so preferably in c:/R/R-3.x.x
  2. Make sure Rtools is installed. We also recommend installing Rtools in the root, so in c:/Rtools
  3. Add the following environment variables (read this if you don't know how):
    • R_HOME with the location of R (e.g. c:/R/R-3.1.3)
    • HOME with the location of your home folder (e.g. c:/users/john)
    • R_LIBRARY with the location of your R library (e.g. c:/users/john/R/win-library/3.1)
  4. We found it is best to restart your computer for the environmental variables to take effect.
  5. Several OHDSI packages require Java, so please install that as well.

Tool developers

Here are instructions for when you want to develop OHDSI tools yourself.

(Still need to write this)

documentation/r_setup.1428371397.txt.gz · Last modified: 2015/04/07 01:49 by schuemie