Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on Apr 25, 2017

Lightweight R console in Spotfire (Text Area)

Why is it needed?

- One of the bigger painpoints for spotfire when being compared to competitors (PowerBI etc) is not being able to execute code or query in a user friendly console window manner without the tedious Data Function hooks

How should it work?

User is able to insert text chunks -- code chunks -- output chunks  in the same text area, much like Notebooks (Jupyter) in accordance to literate statistical programming principles. Or at the very least have a console window to input R code & output window to view the code.

A preliminary hack of the idea can be created by basically I resizing the property box to seem like a large query console- let's call this prop1. Data function takes the string property prop1 as input parameter & treats it as script inside the DF & on clicking a button- it executes.

The executed output is saved as string property prop2 which is then displayed as "output box".  Between script calls, I'm saving the state of the workspace (RDATA or RDS) object using Sobjecttoblob. Such that subsequent script calls (or Data Function calls) can get the blob, turn it into R object, modify it & save changes again as blob ready for the next call.
  • Attach files
  • Guest
    Reply
    |
    Apr 26, 2017

    After seeing DJ's presentation last week I also hacked together a very similar lightweight R interpreter for general R commands, also saving state between calls (attached screen shot).