I have very simple Galaxy wrapper for simple R function. The following mergefun.xml file.
<tool id="mergefun" name="mergefun" version="1.0.0">
  <description>merge two datasets </description>
 <command><![CDATA[
        Rscript ~/Documents/galaxy_development/galaxy/tools/mergefun/mergefun.R --input1 $input1 --input2 $input2 --output $output
    ]]></command>
  <inputs>
    <param name="input1" type="data"
          label="encoded data" help="encoded must be a rda file" 
    />
    <param name="input2" type="data" 
              label="encoded data" help=" must be  rda file" 
    />
  </inputs>
<outputs>
    <data format="tabular" name = "output" label="output" />
</outputs>
  <help>
        merge two datasets 
  </help>
  </tool>
Here is simple R script with the function.
mergefun <- function(input1, input2){
  in1 <- input1
  in2 <- input2
  output <- merge(in1, in2)
  return(output)
}
output <- mergefun(input1=input1, input2=input2)
write.csv(output, file="merged_data.csv")
When I run I am getting the following error.
An error occurred with this dataset:
Error in mergefun(input1 = input1, input2 = input2) : 
  object 'input1' not found
Execution halted
It may be simple error as I am new to galaxy. Help appreciated.
