R interpreter $ with forecasts

asked 2015-01-02 20:10:01 +0200

joelmac gravatar image

updated 2015-01-03 23:40:34 +0200

kcrisman gravatar image


I'm trying to use the R interpreter in sage for a script I'm running that makes use of both sage and R.

I'm coming across a problem in the sagemath R interpreter where I am trying to perform the following (R script):

data <- AirPassengers
data <- log(data)
ARIMA <- arima(data, order = c(1, 0, 1), list(order = c(12,0, 12), period = 1)) 

Namely, I am trying to "unlog" an R forecast and then plot it. I'm finding I cannot perform the last step in sage. I don't think the "\$" operator works in sage, so I am using the other reference method fc['"x"'] = r.exp(fc['"x"']) but I get an error saying this value is not able to be assigned to. Anyone know how to get around this, or what the equivalent to the "\$" operator would be in the sage r interpreter?

edit retag flag offensive close merge delete