0

I'm running another program using the system() function in R. I'm feeding in command line features for the other program. When I miscode the parameters, I'll get an error message that I can't delete the associated file because it's still being controlled by the program I called in the system() call.

Is there a way to manually kill these types of processes besides restarting R which is what I'm currently doing?

An example would be something like:

system("python myFile.py")
Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
screechOwl
  • 27,310
  • 61
  • 158
  • 267

1 Answers1

2

On Windows, you can use TASKKILL command to kill a process.

E.g.

TASKKILL /IM python*
CHP
  • 16,981
  • 4
  • 38
  • 57