unnest_calls: Unnest R calls

Description Usage Arguments Value Examples

View source: R/unnest_calls.R

Description

Unnest R calls

Usage

1
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

1
2
3
4
5
6
7
8
9
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)

tidycode documentation built on Dec. 11, 2019, 1:08 a.m.