make_call: Make and evaluate calls.

Description Usage Arguments Examples

View source: R/make-call.R

Description

Make and evaluate calls.

Usage

1
2
3
make_call(f, ..., .args = list())

do_call(f, ..., .args = list(), .env = parent.frame())

Arguments

f

Function to call. For make_call, either a string, a symbol or a quoted call. For do_call, a bare function name or call.

..., .args

Arguments to the call either in or out of a list

.env

Environment in which to evaluate call. Defaults to parent frame.

Examples

1
2
3
4
5
6
7
8
# f can either be a string, a symbol or a call
make_call("f", a = 1)
make_call(quote(f), a = 1)
make_call(quote(f()), a = 1)

#' Can supply arguments individual or in a list
make_call(quote(f), a = 1, b = 2)
make_call(quote(f), list(a = 1, b = 2))

hadley/pryr documentation built on Feb. 20, 2018, 6:11 a.m.