Keywords: TERR, R packages, data functions, filters, vctrs, dplyr
Description: Spotfire users may encounter random errors when applying filters to generate customized reports in dashboards using TERR data functions. These errors typically involve issues loading R packages like dplyr and vctrs. Common error messages include:
-
"Spotfire Enterprise Runtime for R returned an error: The data function 'ae summ by worst tox' could not be executed. Error in library(pkg, character.only = TRUE) : there is no package called 'dplyr'"
-
"Spotfire Enterprise Runtime for R returned an error: The data function 'ae summ by worst tox' could not be executed. Error in .package.execute.initialization.function(ns, ".onLoad", dirn : error executing function '.onLoad' from package 'vctrs' loaded from D:/R_Packages/library : Error in function (libname, pkgname) { check_linked_version(pkgn... : could not find function "ns_env""
Solution:
Two main factors can contribute to this issue:
-
Package loading order:
- Problem: Other CRAN packages may attempt to use "vctrs" functions before "vctrs" itself has fully loaded.
- Fix: a. Explicitly load "vctrs" before other CRAN packages in the data function's TERR session. b. Clear the "Packages (separated by semicolons)" field in the data function's "Edit Script" dialog.
-
Package Version Mismatches:
- Problem: Version conflicts between "vctrs" and other installed CRAN packages.
- Diagnostic Steps: a. Download "DiagnosticDataFunction--TERR--ForceLocal.dxp" (attached below). b. Open the file in a new Analyst session. c. Run the diagnostic function and collect results. d. Open a case with Revvity and provide the diagnostic results for analysis.
Additional Steps:
-
Update to the latest hotfixes:
- Spotfire Analyst: SPOT_sfire_deploy_14.0.3 HF-013 or above.
- Spotfire Enterprise Runtime for R - Server Edition: SPOT_terrsrv_1.17.4 HF-002 or above.
- TERR Console: SPOT_terr_6.1.3 HF-001 or above.
-
If issues persist after these steps, contact Revvity Support for further investigation.
By following this guidance, users should be able to resolve intermittent TERR errors and successfully apply filters to generate customized reports in Spotfire dashboards.