need a help - calling R code from C#

Mar 10, 2014 at 12:41 PM
Could you please help me to call the below code from C# using RDotNet ?

require(randomForest)
load('E:/ResearchAndDevelopment/Programming R/RInputOutput/realtime/rfmodel.rda')
test<-read.csv('E:/ResearchAndDevelopment/Programming R/RInputOutput/realtime/test.csv')
pred<-predict(rf,test)
pred<-as.data.frame(pred)
pred<-cbind(test,pred)
write.csv(pred,'E:/ResearchAndDevelopment/Programming R/RInputOutput/realtime/output.csv')

Thanks
Venkat
Developer
Mar 10, 2014 at 10:09 PM
It looks pretty straightforward to adapt one of the examples in the documentation as a starting point to your R code, and previous discussions about calling (source) R code from file are available.