shutdown | R Documentation |
There is a command shutdown
in both Windows and Linux, and this
function uses it to shut down a computer.
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 <https://yihui.org>
system
, Sys.sleep
if (interactive()) { # 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' :) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.