ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 02 Jan 2015 13:10:01 -0600R interpreter $ with forecastshttps://ask.sagemath.org/question/25379/r-interpreter-with-forecasts/Hi,
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):
library(forecast)
data <- AirPassengers
data <- log(data)
ARIMA <- arima(data, order = c(1, 0, 1), list(order = c(12,0, 12), period = 1))
fc<-forecast(ARIMA,h=24)
fc\$mean<-exp(fc\$mean)
fc\$upper<-exp(fc\$upper)
fc\$lower<-exp(fc\$lower)
fc\$x<-exp(fc\$x)
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?
joelmacFri, 02 Jan 2015 13:10:01 -0600https://ask.sagemath.org/question/25379/