In one R file, I plan to source another R file that supports reading two command-line arguments. This sounds like a trivial task but I couldn\'t find a solution online. Any
The simplest solution is to replace source() with system() and paste. Try
source()
system()
paste
arg1 <- 1 arg2 <- 2 system(paste("Rscript file_to_source.R", arg1, arg2))