fun
in a function that runs fun
and then issues a
readline
prompt to prevent further R code evaluation until user
presses a key.
make_blocking(fun, msg = "Press ENTER to continue...", invisible.res = TRUE)
readline
promptfun
invisiblyfun
, wrapped in a function that does the blocking
make_blocking(sum, invisible.res=FALSE)(1:10)