File: make_blocking.Rd

package info (click to toggle)
r-cran-diffobj 0.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,432 kB
  • sloc: ansic: 455; javascript: 96; sh: 32; makefile: 8
file content (26 lines) | stat: -rwxr-xr-x 750 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pager.R
\name{make_blocking}
\alias{make_blocking}
\title{Create a Blocking Version of a Function}
\usage{
make_blocking(fun, msg = "Press ENTER to continue...", invisible.res = TRUE)
}
\arguments{
\item{fun}{a function}

\item{msg}{character(1L) a message to use as the \code{readline} prompt}

\item{invisible.res}{whether to return the result of \code{fun} invisibly}
}
\value{
\code{fun}, wrapped in a function that does the blocking.
}
\description{
Wraps \code{fun} in a function that runs \code{fun} and then issues a
\code{readline} prompt to prevent further R code evaluation until user
presses a key.
}
\examples{
make_blocking(sum, invisible.res=FALSE)(1:10)
}