powered by
Wraps fun in a function that runs fun and then issues a readline prompt to prevent further R code evaluation until user presses a key.
fun
readline
make_blocking(fun, msg = "Press ENTER to continue...", invisible.res = TRUE)
a function
character(1L) a message to use as the readline prompt
whether to return the result of fun invisibly
fun, wrapped in a function that does the blocking.
# NOT RUN { make_blocking(sum, invisible.res=FALSE)(1:10) # }
Run the code above in your browser using DataLab