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

logical. Whether the original input column should be dropped.

Value

The original data frame with an additional three columns:

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]