winch_call: Call an R function from native code

Description Usage Arguments Value See Also Examples

View source: R/call.R

Description

Primarily intended for testing.

Usage

1
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

1
2
3
4
5
6
7
8
9
foo <- function() {
  winch_call(bar)
}

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

foo()

winch documentation built on Oct. 24, 2021, 5:07 p.m.