R (interactive)using forecast library

HI,

I am using R snippet (interactive) in my model to use the forecast library of R. Here is the code which I am writing in R snippet:

knime.out <- knime.in
ts <- ts(knime.in$"Weekly_Sales",frequency = 52, start = c(2010,6))
acf(ts)

library(forecast)
fit < auto.arima(ts)

The above code runs well in R's environment. But in Knime when I evaluate the above code, I am given the following error:

 knime.out <- knime.in
> ts <- ts(knime.in$"Weekly_Sales",frequency = 52, start = c(2010,6))
> acf(ts)
> library(forecast)
Loading required package: zoo
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'lattice' 0.20-23 is being loaded, but >= 0.20.27 is required
In addition: Warning messages:
1: package 'forecast' was built under R version 3.0.3 
2: package 'zoo' was built under R version 3.0.3 
Error: package 'zoo' could not be loaded
> fit < auto.arima(ts)
Error: object 'fit' not found

Can you please give its solution?

Are you pointing to the same R installation? It seems they are different in regard the installed packages. (Try install forecast to a different location.)

Cheers, gabor

Yes, I installed it again in the library of the same path I have mentioned in Preferences of knime. But still the error is same.