RAVE:Install prerequisites

From OpenWetWare
Jump to navigationJump to search
RAVE logo R Analysis and Visualization of iEEG



RAVE is written in the programming language "R", so before installing RAVE, "R" must be installed along with RStudio, an integrated development environment for "R". RAVE requires the latest versions of R and RStudio. If you have older versions installed, update them to the newest version. Trying to install RAVE on older versions of R and RStudio will lead to unpredictable error messages. RAVE runs on Mac, Windows or Linux. For best performance, a 4-core CPU (e.g. Intel i5 or better) with at least 64GB RAM (at least 8 GB per core) is recommended. RAVE displays results using a web browser, and is developed with Google Chrome. Other browsers will run with reduced functionality (e.g. shaders will not render brain slices). Mac and UNIX offers better multicore tools than Windows, so multithreaded operation will be better on these platforms.

Prerequisites for MacOS

1. Install the package manager "brew". Open "terminal" (in the /Applications folder). Copy the command lines shown below into a terminal window. You will be prompted for the administrator password, enter it and then press return to install all packages.

 /usr/bin/env bash
 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After installing "brew", it will suggest some commands to add brew to your path; execute the suggested commands or the next step will fail. They will look something like

 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.profile
 echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile

If you do not add brew to your search path, the following steps will not work unless you manually specify the location of brew.

2. Install the latest version of the R language. Find the latest package file, click to download, then open and install.

==> For newer Macs with Apple CPUs (e.g. M1, M2) make sure to install the correct (ARM) version, e.g. R-X.X.X-arm64.pkg)

3. Install RStudio Desktop. This can be done in one of two ways. Method 1: Install RStudio using brew. Open "terminal" (in the /Applications folder). Copy the command line below and return.

 brew install --cask rstudio

Method 2: Install RStudio from the RStudio website Install RStudio Desktop

For either method, RStudio will be installed in the /Applications folder. We recommend that you open this folder, and right-click on the RStudio icon and select "Options"/"Keep in Dock". This will make it easier to launch RStudio and RAVE.

4. Install the hdf5 (high-performance file system), fftw (fast-fourier transform library), pkg-config (package configuration toolbox). Enter this command into the terminal window:

 brew install hdf5 fftw pkg-config

5. Return to full installation guide.

Troubleshooting: When RStudio is first launched, you may receive this message

 Warning: macOS is reporting that you have not yet agreed to the Xcode license. This can occur if Xcode has been updated or reinstalled (e.g. as part of a macOS update). Some features (e.g. Git / SVN) may be disabled.

To make this error go away, open the "Terminal" app in the Applications folder, enter

 sudo xcodebuild -license accept

For password, type in the password of an account with Administrator privileges. Then restart RStudio. A helpful article in case of XCode installation errors.

If the XCode download from the RStudio install in step 2 fails, install the command line tools manually. First, download XCode. Click "GET" (if instead you see "OPEN", then Xcode is already installed.) Open the "Terminal" app in the Applications folder, enter

 xcode-select --install

Click "yes" to proceed with installing the command-line tools. The message "xcode-select: error: command line tools are already installed" means that you can proceed.

Prerequisites for Windows

These instructions are for Windows 10 with "bash" enabled. You will be asked many questions by the installers; the default response is fine for all of them.

  1. Install the latest version of the R language
  2. Install the latest version of RTools. The version of RTools must match your version of R. RTools contains compilers used to compile routines for faster execution.
  3. Install the free version of RStudio Desktop
  4. Return to full installation guide.

Prerequisites for Ubuntu

To install R, please go to https://cran.r-project.org/ and read installation guide for Linux system. The following guide is for Ubuntu (x86_64) system.

1. Add R-Cran repository to your app list:

Open terminal (if you don't know how, look at your sidebar in ubuntu, `search your computer` enter "terminal", and open it), type the following code:

 # update indices
 sudo apt update -qq
 # install two helper packages we need
 sudo apt install --no-install-recommends software-properties-common dirmngr
 # import the signing key (by Michael Rutter) for these repo
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
 # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
 sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
2. Install R

Copy the following command line by line into your terminal and run

 sudo apt-get install r-base r-base-dev
3. Install compiling tools and system dependencies

After installing R, copy the following command to your terminal and run:

 sudo apt-get install build-essential file git libsodium-dev libffi-dev \
   libbz2-dev libpcre2-dev libcairo2-dev libcurl4-openssl-dev libfftw3-dev \
   libfreetype6-dev libfribidi-dev libgit2-dev libhdf5-dev libharfbuzz-dev \
   libjpeg-dev libpng-dev libssl-dev libssh2-1-dev libtiff5-dev libv8-dev \
   libxml2-dev psmisc procps sudo wget zlib1g-dev

The packages `libv8-dev` is for `V8` package to enable JavaScript. `libxml2-dev` is for `xml2`. `libfftw3-dev` `libtiff5-dev` are necessary for fast-fourier transformations and `libhdf5-dev` is for reading and writing data in open data format `HDF5`. All the other packages are necessary for `devtools` (compilers)

4. (Optional) Install the free version of RStudio Desktop here:

Go to https://www.rstudio.com/products/rstudio/download/#download and download one with keywords "Ubuntu 16.04+/Debian 9+ (64-bit)", move the downloaded file to your **desktop**, rename it "rstudio.deb".

Open terminal, type the following command in your terminal

 cd ~/Desktop
 sudo dpkg -i ./rstudio.deb 

and `RStudio` should be in your application list. Again, if you don't know where it is, look at your sidebar in ubuntu, click **search your computer** and enter "RStudio". See [1] for more help.

Return to full installation guide.