TERR 3.1.1 On TIBCO Spotfire VS TERR 4.4 On RStudio

Hi All,

I have two systems and one of them is running TERR version 3.1.1 with Spotfire 6.5.3, while another is running TERR 4.4 on RStudio. I run same code on same data set on both the system. However, the TERR + Spotfire fails with below error, but TERR + RStudio gives me output successfully. 

I want the code to work on TERR + Spotfire, but not sure why this issue is coming up. Any suggestions?

TIBCO Enterprise Runtime for R returned an error: 'Error in model.matrix.default(mterms, mframe, contrasts.arg = contras : Not all varNames in colnames(data), missing c1c2'.

   at Spotfire.Dxp.Data.DataFunctions.Executors.LocalFunctionClient.OnExecuting(FunctionClient funcClient)

   at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.<RunFunction>d__0.MoveNext()

   at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.<ExecuteFunction>d__0.MoveNext()

   at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__6.MoveNext()

Thanks.

 

1 Comment

Are you sure that both versions of TERR are working on the same data?  When called from Spotfire, TERR uses the function SpotfireData::importDataFromSBDF() to import data in the 'S'potfire 'B'inary 'D'ata 'F'ormat that Spotfire exports.  You can use Spotfire's File/Export/DataToFile (slect type 'TIBCO Spotfire Binary Data Format) to export data from Spotfire in that format and read it into any version of TERR to do some debugging.

Another approach is to modify your data function and add the line

  save( list = objects(), file = "C:/tmp/data.RData")

That makes a data file in the TERR/R binary data format containing all the objects passed from Spotfire to TERR for your data function.  You can load that file into another TERR (or R) session with load("C:/tmp/data.RData") and do some debugging.

wdunlap - Nov 17, 2017 - 2:43pm
+ Add a Comment
Login