Business Intelligence Tools / Developers Corner

TERR Errors with tidyr Package

  • Have you had problems with TERR since the rollout of TERR 4.4 in Spotfire 7.11?
  • Are you running into compatibility problems between package versions?
  • Would you like to be able to remove the default package installation and install a specific version of a package?
  • Are you getting the error — Error in .BuiltIn(“on.exit”) : the S language function ‘on.exit’ is not stored as a variable value, and can only be accessed by evaluating source expressions containing ‘on.exit’ statements — when trying to use the tidyr R package?

The Problem

Last week, a user reached out to me after TERR threw errors when trying to use the fill() function in the tidyr R package. Here is the error…

Error in .BuiltIn(“on.exit”) : the S language function ‘on.exit’ is not stored as a variable value, and can only be accessed by evaluating source expressions containing ‘on.exit’ statements

My company upgraded to 7.12 about 2 months ago.  The user noted this data function worked before the upgrade but had not worked since the upgrade.


In version 7.11, TIBCO upgraded the TERR engine from 4.3 to 4.4 as noted on their Community page. We have experienced a lot of issues with TERR since upgrading to Spotfire  7.12.  (Note, we went straight from Spotfire 7.9 to 7.12).  One of the changes in TERR 4.4 is that by default, TERR now installs the most recent version of the available package.  You can see the version number in the TERR Tools menu (Tools — TERR Tools — Package Management tab), and while this sounds like a good idea, it isn’t always.

Because I’ve experienced multiple TERR problems since the upgrade, I didn’t try to troubleshoot this one myself.  I went straight to TIBCO support.  Here is their response.

TIBCO Response

I am able to reproduce the given error using tidyr package in TERR 4.4. Later I found that there is already a defect submitted for TERR 4.4 in our database. This is a known package/TERR compatibility issue that was introduced (by the CRAN package’s author) in a recent version of the user-contributed “tidyr” package from the open-source R community’s CRAN repository. A fix is planned in TERR 4.5 which is currently in QC testing and not released yet. The reason why you did not see this issue before upgrade to 7.12 is, earlier Spotfire version you had ( that is v7.9 if I am correct) had TERR 4.3 version bundled. TERR 4.3 installs older version of “tidyr” package (version 0.6.3) from our TRAN repository for other package-compatibility reasons. In TERR 4.4 , it installs new version (0.8.1) of this package from CRAN which has TERR compatibility issue using given use case.

TIBCO Support

Now, the response made it sound like the package author created the problem.  In a subsequent response, the tech said this was a TIBCO defect.

Due to defect at our end for tidyr package in TERR 4.4 , as a workaround we used older package from TRAN. If you come across any issues while using any other packages in TERR 4.4 , please report a new case and we will verify by reproducing the given scenario at our end and then suggest workaround/solution.TIBCO Support

The Solution

Thus, the solution is to manually uninstall  version 0.8.1 and install the older version 0.6.3. Now, I am going to show you how to do that.

Step 1 — To begin, go to the TIBCO website to download the older version.

Step 2 — Next, go to Tools -> TERR Tools -> Package Management OR Tools -> Launch TERR Console to confirm the package version that is installed currently.

Run the command packageVersion(“tidyr”) to see the package version. NOTE: I took this screenshot after I installed the old version.  You should see version 0.8.1 (or a higher version).

Step 3 — Then, run the command .libPaths() to return the file path to the package folders.

Step 4 — Navigate thru the user named (ex. jsebby) file path until you find one folder per package.  Rename the existing tidyr folder.  I renamed mine with the version number.  Unzip, copy and paste the package folder downloaded from the TIBCO site in step 1.  Save it here.

Step 5 — When you rerun step 2 executing the packageVersion command, and it should say the older version — 0.6.3.

As mentioned above, this is a TIBCO defect that will be remedied in TERR 4.5.  No information was provided on release versions or dates.  I strongly encourage you to reach out to TIBCO support or the TIBCO community if you run into TERR errors.

Spotfire Version

Content created with Spotfire 7.12.





6 thoughts on “TERR Errors with tidyr Package

  1. Greg Gegner Reply

    I am getting the same error with…put the fix in (nice description of issue and how to fix) and I still have the problem. Simple script…any ideas…

    suspends<-select (suspends,failsuspendtime)

    #2 Parameter Weibull Analysis

    • Julie Sebby Post authorReply

      If you have a support account I would reach out to TIBCO. I have had a number of issues with the more recent versions of TERR, and I’ve been working with TIBCO on them. This is the only solution I know.

  2. Jason Alley Reply

    errors with dplyr as well with upgrade to 4.5

    TIBCO Enterprise Runtime for R returned an error: ‘Error in rlang::signal : ‘signal’ is not an exported object from ‘namespace:rlang’
    signal_soft_deprecated(“`as_data_frame()` is deprecated, use `as_tibble()` (but mind the new semantics).”)
    stop(“‘”, name, “‘ is not an exported object from ‘namespace:”,’.

    • Julie Sebby Post authorReply

      I have had issues with TERR since 7.12 (since the modification to include the most recent package). I get all sorts of errors (related to packages and not) that didn’t happen in older versions.

  3. Brian Reply

    Me too! Thank you so much. I’ve wasted a ton of time assuming it was error on my end.

Leave a Reply

Your email address will not be published. Required fields are marked *