How to make developing TERR in Spotfire less painful

In a previous article I mentioned using RStudio as a development environment for Spotfire TERR (TIBCO Enterprise Runtime for R).

For those of you using Spotfire and not using TERR, it’s an incredibly powerful feature you really need to add to your toolbox. It effectively gives you the ability to use every type of analytical function and data manipulation process ever developed. From Latent Factor Clustering to scripted ETL – it pretty much does it all. However, trying to develop code inside the Spotfire TERR console can be a bit of a pain.

Why? Because you have to click through three menus to execute the code, then if there is an error, you have to parse through Spotfire and TERR’s errors to find the cause.

Therefore, it makes sense to develop in an IDE (such as RStudio) then copy paste your code into Spotfire.

“But RStudio uses R not TERR, so you can’t do that!” Actually, you can! But it requires a few not so obvious steps. Let me show you how:

Step One: Download RStudio

If you don’t have it already, RStudio is the best development environment for R, so you should get it even if you’re not using TERR. (Why are you reading this article by the way?)

Plus the Open Source version is completely free so you have no excuse. Get it here.

There’s a whole bunch of little configuration tricks we can discuss, but that’s for another article.

Step Two: Show hidden folders

Spotfire by default hides the folder containing the TERR engine, so to find it, you have to make it stop hiding. To accomplish that you have to “Show Hidden Folders.”

Here’s how you do it on Windows 7.

Here’s how to for Windows 8.

Step Three: Find your TERR Engine

Now assuming you have successfully installed RStudio and you have Spotfire installed on your local machine (Again, why are you reading this if you don’t have Spotfire?) you can locate the application Spotfire uses to process R code – The TIBCO Enterprise Runtime for R engine.

It is typically located in C:\Program Files (x86)\TIBCO\Spotfire\[SPOTFIRE VERSION]\Modules\TIBCO Enterprise Runtime for R_[TERR VERSION]\engine\bin

With [SPOTFIRE VERSION] as the version of Spotfire installed on your computer and [TERR VERSION] the TERR version you are currently running.

If you can find the directory …\TIBCO\Spotfire\[SPOTFIRE VERSION]\ but you can’t find “Modules” That directory is still hidden, stop skipping steps, go back to step number two and try again.

Step Four: Point RStudio to your TERR Engine

RStudio defaults to a local instance of R. You probably installed it when you installed RStudio. But we need to point RStudio to TERR not R.

We verified the location of TERR in step three, so now we need to tell RStudio where to find TERR.

1. In RStudio go to Tools > Global Options…

Syntelli tutorial
2. In the General menu, click Change… to change your R version:

Syntelli tutorial
3. TERR Typically does not show up by default, so we’ll need to click “Browse…”

Syntelli TERR tutorial
4. Navigate to the “TIBCO Enterprise Runtime for R_[TERR VERSION]\engine” folder on the path to the TERR engine

Syntelli TERR tutorial
5. Take your pick of either 32 or 64 bit TERR (There isn’t much difference)

Syntelli TERR tutorial
6. Make sure TERR is selected in the “Choose R Installation” Window, click “OK”, and you are ready to go! (After you restart RStudio for the changes to take effect…)

Syntelli TERR tutorial

Step Five: Verify TERR is running in RStudio

When RStudio restarts, take a look at the console. It will tell you what version of R, or in this case TERR, is running. If you see “TIBCO Enterprise Runtime for R..” then you are successfully running TERR in RStudio! Yay!

Syntelli TERR tutorial

Learn even more about TERR by getting our latest Ebook!



Lou Bajuk-Yorgan · February 17, 2015 at 5:40 pm

Hi Daniel

Just wanted to let your readers know that Steps 2 & 3 will be replaced with something much easier in Spotfire 7.0, available soon. In the latest release, users can simply click on the new “TERR Tools” menu item, click “Copy TERR Engine Path to Clipboard”, and they will have the right path, ready to paste into their RStudio configuration.


Marcus Eby · April 29, 2015 at 11:36 am

I haven’t been able to get RStudio to work with TERR. Did you have any issues on your install?

    Daniel Smith · May 1, 2015 at 3:09 pm

    It is likely that there is a hidden folder issue. Make sure you can see the folder “modules” in your local Spotfire directory.
    Which version of Spotfire are you using? With Spotfire 7.0 you have the option to open RStudio directly from Spotfire with the TERR engine already running.
    Hope this helps! Let us know if you have any other questions!

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts


XBRL Automation for Financial Analysis

There is a common misconception about the costs associated with structuring data for financial filings to regulators. Companies assume that converting financial reports to XBRL a high effort / low value expense. But the lack Read more…


Power BI Tutorial: How To Create Bump Charts

In this Power BI tutorial we’ll go over the steps to create bump charts, which are a visually appealing way to view a rank over time. Although not native to Power BI, bump charts can Read more…

Tip of the Week

Up And Running With Row-Level Security In Power BI

It has quickly become the norm for companies to maximize their data potential by using data in their everyday business processes. And as your data grows and users increase, the need for limiting data to Read more…



Register | Lost your password?