Jump to content
We've recently updated our Privacy Statement, available here. ×

Install R custom packages on Spotfire Server to be used in Web Player


Igor Ro

Recommended Posts

I want to know how to Install custom R packages not available in TERR or R public packages (currentlyhave this in-house builtpackage in a folder)on Spotfire Server.

These packagesare used in adashboard and the Web Player should use these packages and the script would update dynamically the data on Web Player.

The problem came some time ago whenwe have migrated to Spotfire 7.12 and the old Spotfire was looking at a local folder for custom R packages (the dashboard was working perfectlyon Web Player)while the new one doesn't have this link to local folder and the dashboard with custom scripts is not working on Web Player.

Many thanks in advance.

Link to comment
Share on other sites

If I understand correctly, you have built a custom R package using TIBCO Enterprise Runtime for R (TERR) 4.4.x or open-source R 3.4.1, and you want to deploy that package from Spotfire Server 7.12 in a way that makes it available in each user's Spotfire Analyst 7.12 desktop client's built-in local TERR 4.4.x engine.

 

.

 

The 'buildSPK()' function in TERR's optional built-in "SpotfireSPK" package will generate a Spotfire SPK file (Spotfire package, with filename extension *.spk) that contains TERR and/or R packages.

 

.

 

You can then deploy this SPK file to Spotfire clients in the same way as you deploy other Spotfire packages using Spotfire Server's Administration Console. In a TERR Console session, the following command will open the TERR help file for the 'buildSPK()' function:

.

help( topic = "buildSPK", package = "SpotfireSPK" )

 

.

 

The buildSPK() function's "certificate" argument provides the means for signing the SPK file.

 

.

 

Once you have built the Spotfire package (*.spk file), a Spotfire administrator can deploy it using Spotfire Server's web-based administration interface, following instructions in the Spotfire Server install/admin manual. Each user will then need to log into Spotfire Server and accept updates, which will download and install the Spotfire package (*.spk) that contains the custom R package.

Link to comment
Share on other sites

Deploying a SpotfireSPK package will not make the custom R package it contains available for use in Spotfire Web Player, however.

.

Unlike the Spotfire desktop client, Spotfire Web Player and Spotfire Automation Services do not have their own TERR engines. They must send data functions' TIBCO Enterprise Runtime for R (TERR) scripts to TIBCO Spotfire Statistics Services (TSSS) via a web address (URL).

.

TIBCO Spotfire Statistics Services (TSSS) is a separate product. (It is not part of Spotfire Server.) After purchasing TSSS, you can download it from TIBCO's edelivery site (edelivery.tibco.com).

.

TSSS 7.11.1 LTS is tested and supported for use with Spotfire 7.9 and later, including Spotfire 7.12.

.

It is particularly important to read the Release Notes for TSSS 7.11.1, because it introduces new features whose default settings limit the ways TSSS and TERR can be used.

.

After you have installed TSSS, a Spotfire administrator can provide its URL as a Spotfire Preference for the Everyone user group. All Spotfire clients (Spotfire Analyst, Web Player, and Automation Services) use this URL to connect to TSSS. It is their only link to TSSS and its TERR engine. The TSSS Installation and Administration Manual has a section with the following title:

.

"Configuring TIBCO Spotfire to use TIBCO Spotfire Statistics Services"

.

That section outlines the steps to provide the TSSS URL for use by the Spotfire clients.

Link to comment
Share on other sites

To install a custom R or TERR package in a TIBCO Spotfire Statistics Services (TSSS) instance's TIBCO Enterprise Runtime for R (TERR) engine, on a Windows server:

.

(1) Remote into the server that hosts the TSSS instance.

.

(2) Copy the zip file (*.zip) that contains the compiled binaries for the custom package onto the server that hosts the TSSS instance.

.

(3) Use Windows Explorer to find your TSSS instance's "TERR.exe" file, then right-click on that file and select "Run as administrator" to open a TERR Console session.

.

(4) Use a TERR like the following to install the package from its zip file:

.

install.packages( "C:/data/NameOfMyCustomPackage.zip", repos = NULL )

.

Note that R and TERR are both case sensitive, and both R and TERR use slashes ("/") as path separators, even on Windows. (A single backslash ("") will not work as a path separator, because it will be treated as an escape character.)

.

(5) Use the following command to list the names of all of the packages that have been installed in this TERR instance:

.

rownames( installed.packages() )

.

(6) Find the name of your package in that listing, to verify that it has been installed.

Link to comment
Share on other sites

Note:

 

.

 

These answers assume you are using TSSS 7.14 or earlier.

 

.

 

Starting with Spotfire 10.0.0 and TSSS 10.0.0, purchase of TIBCO Spotfire Statistics Services includes a downloadable Spotfire SPK file that can be deployed from Spotfire Server as the first step in setting up a TERR Service node (abbreviation TERRSRV) as part of the Spotfire Server instance.

 

.

 

The following public knowledge base article provides a brief discussion of this:

 

.

 

https://support.tibco.com/s/article/TERR-data-functions-via-Web-Player-w...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...