rscript

Rscript: Determine path of the executing script

I have a script called foo.R that includes another script other.R, which is in the same directory: #!/usr/bin/env Rscript print("Hello") source("other.R") But I want R to find that other.R no matter what the current working directory. In other words, foo.R needs to know its own path. How can I do that? ...

Rscript: Define path file as argument

I try this command : Rscript "/Users/test/Scripts/arg_test.R" "path_in=/Users/test/GR/web-app/Rproject/Inputs/Rmerge/Description.csv" path_in2="/Users/test/IdeaProjects/Rproject/Inputs/Rmerge/Template_Auto.csv" but I have this error : Error in parse(text = args[[i]]) : unexpected '/' in "path_in=/" Part of Rscript : args=(commandArg...

Why my bash can't execute R script ?

My script use an access to mysql to get command arguments to launch Rscript. Its use is as follows : Rscript $RFILE $ARGUMENTS (RFILE corresponding to path to Rscript, and ARGUMENTS corresponding to path file used and agr). I try, different way, but I still have errors, here a copy of my bash script : #!/usr/bin/env bash # Execute R pr...