Learn R Programming

cwhmisc (version 5.0)

waitReturn: Wait for

Description

Wait for the user to type , depending on argument.

Usage

waitReturn(q="",ask=TRUE)

Arguments

ask
TRUE will generate the interruption, FALSE will not.
q
String for prompt

Value

  • None.

Details

The interruption will only be generated for the interactive use of R and if the call is not sinked (where it would hang the process).

Examples

Run this code
for (ii in 1:5) {
    cat(ii,"")
    waitReturn(ii %% 2 == 1) 
  }

Run the code above in your browser using DataLab