I am running a batch file (.bat) to run an R script which works fine. My batch file is ran daily with my task manager. What I am trying to do now is figure out how to pause
my batch file if the condition in R script stops the R script.
My batch file:
@echo off
"C:\Program Files\R\R-3.5.2\bin\Rscript.exe" C:\Auto_R_Reports\Codes\SICK_WTGs.R
My R script:
if(NROW(Sick_WTG_USA) == 0){
stop('NO SICK WTGs')
} else {source("./Codes/2WKcheck.R")}
The idea is that when the if condition in R script evaluates true and my R script stops, I also want my batch file to pause
so that I know it stopped and paused.