How to List the CRAN Packages on TIBCO Cloud Spotfire


This topic applies only to users of TIBCO Cloud Spotfire Analyst.

When you create a data function for users to be able to run on TIBCO Cloud Spotfire, you might want to take advantage of some of the packages from the Comprehensive R Archive Network (CRAN), as well as the packages that come installed with the Spotfire® Enterprise Runtime for R (a/k/a TERR™). However, remember that if you use a CRAN package in an analysis on TIBCO Cloud Spotfire, that package must also be available on TIBCO Cloud Spotfire.

TIBCO Cloud Spotfire includes an archive containing over 500 CRAN packages. You can retrieve this list, along with the versions posted, their dependencies, and their license information, by creating a data function and saving it to TIBCO Cloud Spotfire.

To complete this task, you must meet the following prerequisites.

To create a data function that lists CRAN packages on TIBCO Cloud Spotfire:

  1. Open and log into TIBCO Cloud Spotfire Analyst.

    Comment: This version of Spotfire Analyst saves analyses to the library on TIBCO Cloud Spotfire.

  2. On the menu bar, click Tools > Register data functions.

    Response: The Register Data Functions dialog is displayed.

  3. In the Register Data Functions dialog, provide the following information.
    Name: Installed packages.
    Type: R script - Spotfire Enterprise Runtime for R.
    Packages: Leave blank
    Description: Report the available packages.
    Allow caching: Clear the check box.
    Script tab: packages <- installed.packages()

  4. Click the Output parameters tab.

  5. Click Add, and in the Output Parameter dialog, provide the following information:
    Result parameter name: packages.
    Display name: Installed packages.
    Type: Table.
    Description: A table of all of the TERR and CRAN packages installed; a result of calling the function installed.packages().

  6. On the Register Data Functions dialog toolbar, click Run.

  7. In the Edit Parameters dialog, select  Refresh function automatically.
    Comment: You must select this check box, or your analysis displays only the packages available in your Spotfire Analyst installation.

  8. Click the Output tab, and for the Output handler, click Data table, and then click OK to accept the changes and run the data function.

  9. Click Close, and then click Yes to save the data function to the library on TIBCO Cloud Spotfire.

  10. On the authoring bar, click Visualization types and click Table to create a table visualization displaying all columns of the new Installed packages data table.

  11. Save the analysis to your library folder.

  12. Open the analysis in TIBCO Cloud Spotfire.
    Response: The table displays the available packages.

You can share this analysis with any members of your team who are interested in the available CRAN packages.

See also:

How to Use Data Functions