winch_call: Call an R function from native code

View source: R/call.R

winch_callR Documentation

Call an R function from native code

Description

Primarily intended for testing.

Usage

winch_call(fun, env = parent.frame())

Arguments

fun

A function callable without arguments.

env

The environment in which to evaluate the function call.

Value

The return value of fun().

See Also

winch_stop()

Examples

foo <- function() {
  winch_call(bar)
}

bar <- function() {
  writeLines("Hi!")
}

foo()

winch documentation built on April 20, 2023, 9:14 a.m.