Jump to content

Load an estimated R model into Spotfire


Alessandro Ghiretti

Recommended Posts

We have written an R scripts that loads an estimated R model and given some inputs parameters returns a forecast.

To load the estimated model the scripts change the directory to the folder where the model is stored which is located onthe server where the Statistics Services and the open source R engine we are using are both installed.

Since we are using R 3.4.4. we saved the model usingsave(model, filename = 'mymodel.rda') and to load the model we use load(filename = 'mymodel.rda').

The problem is that the Spotfire return the following error:

TIBCO Spotfire Statistics Services returned an error: 'load(file = "model.rda") : bad restore file magic number (file may be corrupted) -- no data loaded'.

at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteFunctionClient.OnExecuting()

at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.d__31.MoveNext()

at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.d__12.MoveNext()

at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.d__3.MoveNext()

and the following warning:

file 'model.rda' has magic number 'RDX3'

Use of save versions prior to 2 is deprecated

The configuration we are currently running is the following one:

Spotfire 10.2

Statistics Service 7.10

R 3.4.4.4 used as the Sptofire engine

 

Thank you

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