Description Usage Arguments Details Value Author(s) References See Also Examples
There is a command shutdown
in both Windows and Linux, and this function just uses it to shut down a computer.
1 | shutdown(wait = 0)
|
wait |
time to wait before shutting down (in seconds); passed to |
After the time wait
has passed, R will execute shutdown -s -t 0
(for Windows) or shutdown -h now
to shut down the computer.
The status code of system
.
Yihui Xie <http://yihui.name>
http://cos.name/en/topic/shut-down-your-windows-with-r
1 2 3 4 5 6 7 8 9 | ## Not run:
## when your code is extremely time-consuming, you may need this function
# e.g. you go to sleep, and R is running
# long computation... complex graphics...
# and long long computation... at last,
shutdown()
# the next day you wake up, "thank you, R" :)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.