I'm wondering if there is a way to run rscript within another script? like we do in Java
For example:- I have script-A, and script-b, so when I run script-b it should run script-a first automatically.
I'm wondering if there is a way to run rscript within another script? like we do in Java
For example:- I have script-A, and script-b, so when I run script-b it should run script-a first automatically.
You can use the source()
function to run code in another file. So at the top of your script-b, just put source('path/to/script-A.R')
.