r wait for key press code example Example: how to wait for a key press in R invisible(readline(prompt="Press [enter] to continue"))