I am trying to run a Data Function by passing a Date column, but I get this error when trying to use the lm() TERR function.

Hello, I am trying to run a Data Function by passing a Date column, but I get this error when trying to use the lm() TERR function

Could not execute function call.TIBCO Spotfire Statistics Services returned an error: 'Ops.POSIXt(x, 2) : &apos;^&apos; not defined for &quot;POSIXt&quot; objects'.   at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteFunctionClient.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()

simplified R script:

lm.1 <- lm(y ~ x + I(x^2) + I(x^3))
r <-  predict(lm.1,interval="confidence")

inputs are: y (real) and x (date)

output: r

Attachments

AttachmentSize
Image icon Untitled.png32.9 KB
Login