make_blocking: Create a Blocking Version of a Function

View source: R/pager.R

make_blockingR Documentation

Create a Blocking Version of a Function

Description

Wraps fun in a function that runs fun and then issues a readline prompt to prevent further R code evaluation until user presses a key.

Usage

make_blocking(fun, msg = "Press ENTER to continue...", invisible.res = TRUE)

Arguments

fun

a function

msg

character(1L) a message to use as the readline prompt

invisible.res

whether to return the result of fun invisibly

Value

fun, wrapped in a function that does the blocking.

Examples

make_blocking(sum, invisible.res=FALSE)(1:10)

brodieG/diffobj documentation built on June 11, 2025, 3:53 a.m.