arg_calling: Pull out an line, expression, or argument calling a specified...

Description Usage Arguments Examples

Description

Find an argument

Usage

1
arg_calling(ex, ..., n = 1L, message = "call to function")

Arguments

ex

An call to be checked

...

unquoted function names

n

Look for the nth passing argument

message

character string message on failure

Examples

1
2
3
4
5
6
7
8
ex <- for_checkr(quote(15 * sin(53 * pi / 180)))
ex2 <- for_checkr(quote(yy <- sin(3))) # at the top level
line_calling(ex, sin)
# look only in arguments: the top-level function doesn't count
arg_calling(ex, sin)
arg_calling(ex2, sin)
# But line_calling() will find it at the top level.
line_calling(ex2, sin)

dtkaplan/checkr documentation built on May 15, 2019, 4:59 p.m.