R code for the server
Whether you are writing expressions or functions, your R language scripts (either TERR or open-source R) for the server are similar to those you write for the desktop. However, you might need to account for some differences.
For example, you should plan to write code that can be run on any platform.
Note: Open-source R is available under separate open source software license terms and is not part of TIBCO Spotfire Statistics Services. As such, open-source R is not within the scope of your license for TIBCO Spotfire Statistics Services. Open-source R is not supported, maintained, or warranted in any way by TIBCO Software Inc. Download and use of open-source R is solely at your own discretion and subject to the free open source license terms applicable to open-source R.
Development and production server platforms can differ. Therefore, when you write your code to run on the server, make sure that it can be run on any platform.
Important: By default, certain Spotfire Statistics Services capabilities are disabled. If you have functions that you created or used in a previous release, you might find that they no longer work as expected. Additionally, any expression that TERR determines to be potentially malicious is disabled. Below is a non-exhaustive example of some of the capabilities disabled by default in Spotfire Statistics Services.
- Sending TERR expressions that perform I/O to the file system or the internet.
- Spawning new OS processes by calling the system function.
- Calling into Java using the terrJava package, or using functions in the parallel package.
- Loading new packages, except for those included with TERR.
- Calling .C or .Fortran.
- Send expressions to the server using the Expression Service.
- Calling ExtendedServerInfo or sending other expressions that read from, or write to, your server.
- Sending potentially malicious expressions to the server using the URL API.
- Managing files
When you construct an R function to run on the server, take care to manage the file output appropriately. - Access databases using R code
You can access data stored in databases from your script. - Code for the Expression client interface
The Expression client interface is designed to be used in client applications. As long as the expression is valid, the Expression client interface passes it to the engine. - R language differences and limitations
Differences exist between TERR and open-source R. However, we strive for near-total compatibility. The help for TERR includes a list of known differences between it and oopen-source R. To see this document, from the TERR console, type help.start() and follow the link to the document Differences Between TIBCO Enterprise Runtime for R and Open-Source R. - Deploying R code for the Function client interface
Most client applications that use the Spotfire Statistics Services Function Client Interface call custom functions that were written for the client application. Typically, they are not part of the packages included with TERR. The Spotfire Statistics Services Function Client Interface calls one function, and then it releases the engine. To use the Function Client Interface, follow these steps. - Code for the Function client interface
The Function client interface provides more structure and protection for your server than does the Expression client interface. - The AsterDB package
The AsterDB package, which is provided in Spotfire Statistics Services, is a specialized package designed for working with the Teradata® Aster Database.
Copyright © TIBCO Software Inc. All rights reserved.