Searches through a file for function calls using SYMBOL_FUNCTION_CALL
Usage
find_function_calls_in_file(
relative_path = NULL,
foo_strings,
filter_for_test_that = FALSE
)
Arguments
- relative_path
path of file to search in
- foo_strings
string vector of function names to search for
- filter_for_test_that
whether to filter for only functions used after the call to test_that. Default FALSE.
Value
a dataframe with the columns 'foo' for function name and 'location' which gives
the file in which the function is called with the line in which the function is called
appended.
Examples
if (FALSE) { # \dontrun{
find_function_calls_in_file(
relative_path = "tests/testthat/example_project/tests/testthat/test-calculate_costs.R",
foo_strings = "calculate_costs"
)
} # }