Jump to content

Stats Package Install

Ryan Robinson

Recommended Posts

It should indeed come out of the box, in the sense that you do not need to install it.

If you add this TERR data function, run it with no inputs and assign x to an output table, it should work with no error and produce a table with column col containing 100 random numbers.

x=runif(100, min = 0, max = 1)x=data.frame(col=x)
Link to comment
Share on other sites

Thank you Gaia! I want to install the supsmu that the guy shows in the youtube video. He is registering it somehow in Spotfire. How do I get the code in the registration function window that's shown on this video. Click on the link to see what I am talking about. The way it is described is this function is inside the stats package. Thank you so much for trying to help me out!

Link to comment
Share on other sites

Yes supsmu is a function within the stats package. Since the stats package is already installed, supsmu is already available too.

To continue on the previous example, this would give you a data table df with x, y and a smoothed_y

x=seq(1,100)y=runif(100, min = 0, max = 1)df=data.frame(x,y) df$smooth_y=supsmu(df$x,df$y)[[2]]

Here is the help for using supsmu:


If you mean that you are looking to find out how to register a data function in Spotfire, here is some guidance:


Link to comment
Share on other sites

Thank you again Gaia i tried to follow the link you gave me on registering the function. When I put the name "supsmu" into the packages window nothing comes out. Do you think I don't have some settings turned on? I tried to click open button but library goes to nothing that has stats folder. OpenLibrary.thumb.jpg.1340e535e71a03824d8f89d90574c62d.jpg 


Thank you again for all your help

Link to comment
Share on other sites

you don't need to put anything in the packages window in this case, as stats is available automatically. ( I normally ignore the packages window and add a library(<package>) statement instead as first line of the script.)

However in this case, you don't need to add anything to the script or packages.

Link to comment
Share on other sites

Hi Ryan,

Looking at this thread, we think you will benefit from reading about the overall process first to help you understand how you use this – and hope this overview helps:

  • In Spotfire, you incorporate R/TERR code using "data functions"
  • You can create a data function in Spotfire per the link Gaia sent (This page also has a number of helpful links with good overviews of the topics)

When registering your data function:

  • The "Script" is the R/TERR code that you write. Here is where you write your custom R/TERR code, and can call the supsmu package for example.
  • The Input Parameters/Output Parameters/etc all define how that script will be incorporated in the Spotfire dxp file (what data am I passing in? Where do I want my data to be output in the Spotfire dxp? ie ouput the data to a new data table called "Results")

I will also check to see if we can point you to an example with a data function that uses the supsmu package so you can see it and explore as this should help you further understand the concept.

Let us know how you get along!


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