installr (version 0.21.0)

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

Description

A central function to run functions for shuting 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

http://superuser.com/questions/42124/how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu , http://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

Run this code
# 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" :)
# }

Run the code above in your browser using DataLab