Hi
I am getting a parameter from the previous stage of the pipeline as AllData\$filename. This has the correct filename and works when I print it out using HTML Table Viewer.
I now have a Custom R Script component in my protocol and I am trying to read the CSV file inside the R script like this: run1<-read.csv(file=AllData\$filename,header=TRUE);
When I try to do this, I get an error saying:
> # Script body:
> run1<-read.csv(file=AllData\$filename,header=TRUE);
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
'file' must be a character string or connection
Calls: read.csv -> read.table
Execution halted
And yes the CSV file exists in that directory. But I am not able to use the filename inside the read.csv function. Any help would be much appreciated. Thanks.
Regards
Abdul Basith