# TERR, the TERR Service, and Spotfire Statistics Services

Spotfire Analyst users can register and run TERR data functions by using the local TERR engine, or by using the TERR service. Web client users can use the defined TERR data functions in analyses in a web browser.

The engine Spotfire Analyst users specify depends on the statistics language used, and whether the analysis is going to be shared with others through the web client.
Note: Make sure you use the same release of TERR for analyses across services.

## TERR

Spotfire Analyst authors can create analyses that use TERR data functions or TERR custom expressions to run locally (on Windows only). They can use the built-in predictive analytics in Spotfire Analyst. They can also use the TERR engine that is provided with Spotfire Analyst. However, note that authors must have the correct Spotfire license to use the TERR engine.

To specify the local TERR engine:

1. In Spotfire Analyst, from the menu, click Tools > Options.
2. In the Options dialog, from the left list, select Data Functions.

By default, the option Use locally-installed Spotfire Enterprise Runtime for R engine is selected.

## TERR Service

The TERR service is installed on a node for your Spotfire Server. The TERR service is a licensed component of Spotfire Statistics Services. It is provided to Spotfire Server customers as a component under Spotfire Statistics Services on the Spotfire Download site. The TERR service provides functionality for deploying TERR data functions, expression functions, or other advanced analytics.

Spotfire Analyst authors can share analyses that they created using TERR data functions, TERR predictive analytics, or TERR custom expressions with users of the Spotfire web client. By default, when such an analysis is shared, the TERR service provides the functionality for the users.
Note: Data functions written to use open-source R require the Spotfire Service for R. They do not work with the TERR service.

## Spotfire Statistics Services

If data functions or custom expressions have been created using TERR, and if you have the TERR service installed and deployed on a node for Spotfire Server, then Spotfire always uses the TERR service, even if the analyst supplies a custom URL, and you have a Spotfire Statistics Services server configured to use TERR deployed in your environment. Spotfire disregards the custom URL for all analyses that use the TERR engine. This behavior provides both backwards compatibility with existing Spotfire Statistics Services plus TERR installations, and makes migration to TERR service easier.