Hi Sir,

I have installed the R plugin in my PDI 5.1 CE and successfully working fine. I have written one transformation, in that transformation I am getting a few of parameter through Get variable step and passing that parameter value in my R script step dynamically. but unfortunately I am unable to pass the parameter in the R script and getting error which I have mentioned below:

2016/01/07 14:25:27 - Write to log.0 -
2016/01/07 14:25:27 - Write to log.0 - ------------> Linenr 1------------------------------
2016/01/07 14:25:27 - Write to log.0 - log---
2016/01/07 14:25:27 - Write to log.0 -
2016/01/07 14:25:27 - Write to log.0 - input_path = D:\survey\study\urc\input
2016/01/07 14:25:27 - Write to log.0 - processed_path = D:\survey\study\urc\processed
2016/01/07 14:25:27 - Write to log.0 -
2016/01/07 14:25:27 - Write to log.0 - ====================
2016/01/07 14:25:27 - Write to log.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2016/01/07 14:25:27 - R script executor.0 - ERROR (version 5.1.0.0, build 1 from 2014-06-19_19-02-57 by buildguy) : Unexpected error
2016/01/07 14:25:27 - R script executor.0 - ERROR (version 5.1.0.0, build 1 from 2014-06-19_19-02-57 by buildguy) : java.lang.ArrayIndexOutOfBoundsException: -1

2016/01/07 14:25:27 - R script executor.0 - at java.util.ArrayList.get(ArrayList.java:324)
2016/01/07 14:25:27 - R script executor.0 - at org.pentaho.di.trans.steps.rscriptexecutor.RScriptExecutorData.pruneNullRowsFromSample(RScriptExecutorData.java:399)
2016/01/07 14:25:27 - R script executor.0 - at org.pentaho.di.trans.steps.rscriptexecutor.RScriptExecutor.processBatch(RScriptExecutor.java:224)
2016/01/07 14:25:27 - R script executor.0 - at org.pentaho.di.trans.steps.rscriptexecutor.RScriptExecutor.processRow(RScriptExecutor.java:184)
2016/01/07 14:25:27 - R script executor.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2016/01/07 14:25:27 - R script executor.0 - at java.lang.Thread.run(Thread.java:662)
2016/01/07 14:25:27 - R script executor.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)

Also i have mentioned my R script where i am using those parameter value:

library(foreign)
library(surveydata)

#####getting variable script start here#####

input_path<-as.character(input_path[1,1])

processed_path<-as.character(processed_path[1,2])

#####getting variable script end here#####

file <- dir(input_path, pattern =".sav")
file_path<- paste(input_path,file[1],sep='/')
file.copy(file_path,processed_path)
file.remove(file_path)
found1<-as.data.frame(input_path)
found1

Let me know where i am doing wrong.