[R] Terminating a cmd windows from R

SIMON Nicolas N|co|@@@SIMON @end|ng |rom @p-hm@|r
Sat Aug 17 13:47:30 CEST 2024


I execute a program using a batch file from R.
The program may have infinite computation. So I need to be avle to stop it.

nm_log <- "c:/nm74g64/run/nmfe74"
nmi    <- "202"
nmrun <- paste0("cmd.exe /k ",nm_log,".bat ",nmi,".ctl ",nmi,".lst")
# run
system(nmrun, invisible = F, show.output.on.console = T, wait = T)



Le 17 août 2024 à 13:31, Duncan Murdoch <murdoch.duncan using gmail.com> a écrit :


On 2024-08-17 6: 21 a. m. , SIMON Nicolas via R-help wrote: > I would like to stop a dos shell windows following the cmd (execute) command. Is there a way to do that from R? I think you need to give more detail on what you are trying to do. 


On 2024-08-17 6:21 a.m., SIMON Nicolas via R-help wrote:
> I would like to stop a dos shell windows following the cmd (execute) command. Is there a way to do that from R?

I think you need to give more detail on what you are trying to do.  In
Windows, "cmd" is supposed to open a shell window.   Could you show us
an example of what you are doing?

Duncan Murdoch



More information about the R-help mailing list