I am having another program invoke R via a .bat file. The .bat file is very simple - "R CMD BATCH myscript.R". Everything works fine but I wish my script would run faster
If I run the script in RStudio after having loaded the libraries and data, the script takes about 2 seconds. If I run it with the .bat file it takes about 6.5 seconds. Every time the .bat file runs, it has to load in libraries and some data first. Is there a way around this?
I am new to using the command line in this way so please be gentle I am on Windows, in case that was not clear. Thanks in advance!