os.manage: Gives managing option to the current OS (shutdown, restart,...

View source: R/os.manage.R

os.manageR Documentation

Gives managing option to the current OS (shutdown, restart, sleep, hibernate, etc...)

Description

A central function to run functions for shutting down, restarting, sleeping (etc.) your computer. This will run these functions immediately.

Usage

os.manage(GUI = TRUE, ask = TRUE, ...)

Arguments

GUI

a logical indicating whether a graphics menu should be used if available. If TRUE, and on Windows, it will use winDialog, otherwise it will use menu.

ask

a logical indicating whether to ask the user for the number of minutes in which to perform the operation.

...

not in use

Value

The status code of system.

References

https://superuser.com/questions/42124/how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu , https://www.howtogeek.com/howto/windows-vista/quick-tip-create-shutdown-restart-lock-icons-in-windows-vista/

See Also

system,shell, Sys.sleep, is.windows, os.shutdown, os.sleep, os.hibernate, os.lock, os.restart

Examples

## Not run: 
## when your code is extremely time-consuming, 
# you may need this function; 
# e.g. you wish to go to sleep, 
# while keeping R running with a long computation... 
# complex graphics... and long long computation... 
# at last,
os.manage()
## the next day you wake up, "thank you, R" :)

## End(Not run)

installr documentation built on Nov. 13, 2022, 1:06 a.m.