Problem with Rmd script
matsavage opened this issue · 2 comments
I am having a problem with the following block of code when running an Rmd script;
fit <- auto.arima(northts, lambda=0, d=0, D=1, max.order=4,
stepwise=FALSE, approximation=FALSE)
autoplot(forecast(fit, h = 36)) + xlim(2010, 2018)
Executing this results in a 'unsupported character in output path' error, and seems to only arise fro plotting the figure, which is strange as ggplot seems to be supported well everywhere else, and I get the same error just using the basic 'plot(forecast(fit, h = 36)) + xlim(2010, 2018)' too.
Hi Mat, it seems that the Rmd renderer (or maybe ggplot) wants to save the plots as pngs with filenames based on the names of the Rmd code chunks that they're in. So the issue in this case was the brackets in Auto ARIMA (NH)-1.png
. Sorry that wasn't clear! We'll see about improving the feedback in this type of case.
Ah, thanks a lot! I thought it was a problem with autoplot
, and completely overlooked the Rmd titles. I'll keep this in mind!