我如何加载像“预测”这样的软件包?''''''在C#中通过R.NET

时间:2015-07-21 13:27:08

标签: c# r r.net

我正在尝试使用:

engine.Evaluate("dataset = read.table(file.choose(),skip=1)");

                     engine.Evaluate(@"install.packages('forecast')");
                    engine.Evaluate("require('forecast')");
                    engine.Evaluate("library('forecast')");

engine.Evaluate("z1 <- ts(dataset,frequency = 15, start=c(2010,11))"); 
                    engine.Evaluate("forecastA <- HoltWinters(z1)");
                    engine.Evaluate("forecast2 <- forecast.HoltWinters(z1,h=6)");
                    engine.Evaluate("plot(forecastA)");
                    engine.Evaluate("plot.forecast(forecast2)");

但它说

  

对象$ x中的错误:$运算符对原子向量无效

0 个答案:

没有答案