Is it possible to call a R program with in a R program?
Say for example, I am looking for something like this:
If condition == X{
CALL "Pgm A"
} else {
CALL "Pgm B"
}
This kind of syntax I have used in C. Is there a way similar in R?
Thank you.
Run multiple R scripts from the command line in parallelTo parallelize this you can run the command mentioned above multiple times and only change the tiling arguments. Multiple R session on multiple cores will process your jobs. You can also create a shell script for doing this.
On your keyboard: press CTRL+ENTER . The line will be executed, the cursor jumps into the next line. Again, press CTRL+ENTER to execute the next line … and so far, and so on.
This should do
if(condition==X){
source("program_A.R")
}else{
source("program_B.R")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With