Jump to content

Benefits of using Rstudio IDE within Spotfire TERR

Numan Karim

Recommended Posts

My team is currently heavily utilizing Spotfire Client as well as an Rstudio server. Both the server and Spotfire are pointed to the same area where all our datasets are located.My current goal is to utilize R in conjunction with Spotfire to maximize data manipulation activities as well as visualization capabilities. I recently started playing around with the TERR data functions and noticed there are certain bugs not quite worked out yet when using R code in Spotfire.

My questions areabout the Rstudio IDE. I could not find significant explanation of this functionality so I'm hoping to get a good understanding here.


What is Rstudio IDE My first impression of it is that it simply your R code running in your rstudio desktop client


How does this work For example if create a table in Rstudio by subsetting and pivoting some data, will that datatable be readily accessible in Spotfire to make graphs or such in

Say I want said table to be viewable in Spotfire to other folks, the one pro of Spotfire is that my data refreshes in realtime. Is this the case if the source code is in an IDE Or do I actually have to rerun the code for the data to refresh. I guess simply, would the data refresh the same as it would if it were a TERR data function

In the event the above works. Theoretically can I connect my Rstudio Server to my Spotfire client Would i be able to create a custom table in the server and have that table be available in Spotfire without having to do any kind of exporting




For my team's purposes, I think it would be easier to keep R and Spotfire seperate as our scripts have some bugs when used in Spotfire. However if we can conenct our server to Spotfire, run our code there, and have the table available in Spotfire, it would be the most ideal situation.


Thank you for you insight.

Link to comment
Share on other sites

  • 1 year later...

RStudio is a more convenient environment for developing a complex TERR script than a TERR Console session would be, but a Spotfire data function in a Spotfire analysis (DXP file) that uses the TERR script will run the script in its own TERR session, independent of any RStudio session you have running.


The main thing to keep in mind when using RStudio is to use the supported version of RStudio for the version of TERR you are using. You can find that RStudio version on the system requirements page for each TERR release. In the Spotfire desktop client, you can find the TERR version the client uses in its built-in local TERR engine by selecting "Tools > TERR Tools > Launch TERR Console" from the main menu, then reading the TERR version in the header information at the top of the TERR Console session.


It's also important to use the tested versions (packages used in basic TERR compatibility testing for this TERR release) of any user-contributed R package you use from the open-source R community's CRAN repository, both in your Spotfire desktop client's local TERR engine and in your RStudio/TERR environment.

Link to comment
Share on other sites

RStudio IDE (Integrated Development Environment) IS the RStudio desktop client. It is not a TIBCO product. Seehttps://www.rstudio.com/ for more information.

Typically, you would use RStudio with an open-source R installation; however, we provide guidance forconfiguring the RStudio IDE to write and test TERR scripts and functions, because it is a convenient way to manage scripts, rather than just writing them in the console app, or in the Data Function UI in Spotfire.

We recommend using RStudio as a development and test environment, and then when the scripts are working the way you want them to, you can copy them into Spotfire, set the input and output parameters, and save the data function to the Spotfire library.


Any "bugs" you encounter running TERR instead of open-source R code in Spotfire are probably a result of small incompatibilities between TERR and open-source R. For more information, see the TERR help (Differences between R and TERR, R functions unavailable in TERR, and the CRAN compatibility DXPs available aon TIBCO Cloud Spotfire.


BTW, to run open-source R rather than TERR in Spotfire, you must be running either the Local Adapter, or TIBCO Spotfire Statistics Services (TSSS). (TERR is included with Spotfire, but R is not, and you must configure TSSS to work with R, rather than TERR.)

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...