I'm new to Rscript
so please bear with me, I need to execute a R script (written by another developer) from java and for that I'm using Renjin
. The R script file and other required files are on classpath
i.e. under resources folder.
To achieve this I'm loading Rscript
from classpath and it gets loaded successfully, and Rscript
tries to load a abc.Rda
file internally which is also present in classpath (parallel to R script), the code for same is below
load('abc.Rda')
But when I try to execute script then it throws exception as below:
Could not read from "file:///D:/data/{project-dir}/abc.Rda" because it is a not a file.
Please suggest where I'm making mistake.