0

How can I do to break the long line of my R scripts used to run in c#? For example, if I have this code:

engine.evalute("f.rf=function(i) { NBR_ACH<-ALL_DATA[-intrain,1] set.seed(7) MD.NBR_ACH=randomForest(NBR_ACH~.,data=training,mtry=i,importance=TRUE,ntree=1000) NBResti=predict(MD.NBR_ACH,newdata=testing)c(i,round(sqrt(mean(sum((1-NBResti/NBR_ACH)^2)))/sqrt(length(NBR_ACH)),4))");

In R, it's easier just we do the , and it works very well!

Rprogrammer
  • 457
  • 2
  • 6
  • 19

1 Answers1

1

You could use the verbatim string syntax which allows line breaks and put your line breaks where you would do them in R:

@"Line1
Line2"
ckuri
  • 3,784
  • 2
  • 15
  • 17