pause: Pause and wait for user input

Description Usage Examples

View source: R/07_miscellaneous.R

Description

Tiny little function wrapper, mostly used for looping or when several plots are output by a single function. Waits for user keystroke to move on to next image or exit.

Usage

1

Examples

1
2
3
4
5
6
for (i in c(1:5)) {
  print(i)
  if (i < 5) {
    colordistance:::pause()
  }
}

Example output

[1] 1
Press [enter] to continue or [esc] to exit
[1] 2
Press [enter] to continue or [esc] to exit
[1] 3
Press [enter] to continue or [esc] to exit
[1] 4
Press [enter] to continue or [esc] to exit
[1] 5

colordistance documentation built on March 21, 2021, 1:06 a.m.