unnest_calls {tidycode} | R Documentation |
Unnest R calls
Description
Unnest R calls
Usage
unnest_calls(.data, input, drop = TRUE)
Arguments
.data |
A data frame |
input |
Input column that contains an R call or list of R calls to be split into individual functions |
drop |
|
Value
The original data frame with an additional three columns:
-
line
: the line number of the call -
func
: the name of the function called -
args
: a list of arguments
Examples
d <- read_rfiles(tidycode_example("example_plot.R"))
# Unnest a model call
d %>%
unnest_calls(expr)
# Unnest a model call and keep the call itself using the drop parameter
d %>%
unnest_calls(expr, drop = FALSE)
[Package tidycode version 0.1.1 Index]