function_called: Checks if a function is called optionally with certains args

Description Usage Arguments Details Value

View source: R/utils.R

Description

Checks if a function is called in code

Usage

1
function_called(code, fn, index = 1, has_args = NULL, arg_values = NULL)

Arguments

code

quosure list of input code

fn

name of function to search for

index

which instance of the call to the function should we look for the args

has_args

character vector of args to check that are called in the function call

arg_values

named list of character vectors of the exact arguments values some arguments should take

Details

Function taken with permission from qsslearnr by Matt Blackwell

Value

logical, TRUE if all conditions are met, FALSE otherwise


asteves/cinfeRence documentation built on Dec. 19, 2021, 5:40 a.m.