# Configuring RStudio Windows Desktop Edition to Run the Spotfire Enterprise Runtime for R Engine

Configure the Windows desktop version of the RStudio IDE to work with TERR.

## About this task

Perform this task from the Windows desktop.

## Before you begin

Install RStudio version 2023.06.1 or later for the Windows desktop. (See TERR system requirements for tested versions.)
Note: Due to a change in RStudio for Windows between versions 1.1.136 and 1.1.336, using TERR to print (for example, `print(1:1000)`) runs extremely slowly. If you experience this problem, then in your RStudio session, set `options(error=NULL)`.

## Procedure

1. Configure the `TERR_HOME` environment variable.
   1. In Windows, set the `TERR_HOME` environment variable to the base directory of your installation of TERR.

      For example, C:\Program Files\spotfire\terr61.

2. Configure RStudio.
   1. From the Windows Start menu, launch RStudio.
   2. From within RStudio, on the menu, click Tools > Global Options.
   3. In the General tab, set the R version to your installation of TERR.

      For example, C:\Program Files\spotfire\terr61.

   4. Click Apply, and then restart RStudio.