Cited from Pausing an R script: a generic pause function
pause = function(){
if (interactive()) {
invisible(readline(prompt = "Press <Enter> to continue..."))
}
else {
cat("Press <Enter> to continue...")
invisible(readLines(file("stdin"), 1))
}
}
No comments:
Post a Comment