I want R to shutdown my computer after my (extensive) simulation and saving results, is this possible?
See Question&Answers more detail:osI want R to shutdown my computer after my (extensive) simulation and saving results, is this possible?
See Question&Answers more detail:osYes, look at the function shutdown
in the package fun
.
The flags for system command shutdown
depends on your operating system, the function simply calls the appropriately flagged command.
fun::shutdown
function (wait = 0)
{
Sys.sleep(wait)
ifelse(.Platform$OS.type == "windows", shell("shutdown -s -t 0"),
system("shutdown -h now"))
}