Learn R Programming

installr (version 0.15.3)

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

Description

A centeral function to run functions for shuting down, restarting, sleeping (etc.) your computer. This will run these functions immediatly.

Usage

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

Arguments

use_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

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/ http://cos.name/en/topic/shut-down-your-windows-with-r

See Also

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

Examples

Run this code
## 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