animation - How to make execution pause, sleep, wait for X seconds in R? -
How do you prevent R scripts for seconds or milliseconds for a specified number? In many languages, there is a flax function, but ? Sleep refers to a data set and ? Paused and ? Wait is not present.
Its purpose is self-timing for animation, the desired solution works without asking for user input.
see support (Sys.sleep) .
For example, ? Sys.sleep to
testit & lt; - Function (x) {p1 & lt; - proc .time () Sys.sleep (x) proc.time () - p1 # Using CPU should be negligible} · testit (3.7) stem
& gt; Tritit (3.7) User System 0.000 0.000 3.704
Comments
Post a Comment