chains: Expand a chain into a series of lines, each with '.' as the...

Description Usage Arguments Details Value Examples

Description

Expand a chain into a series of lines, each with . as the input.

Usage

1
2
3
4
5
6
7

Arguments

ex

A checkr_result object with just one line of code.

Details

A magrittr chain consists of a sequence of function calls. Each function takes as input the output of the function before it. (The first element of the chain may be an object or a function call.) The expand_ functions transform chains into a sequence of lines. Each such line (except the first) will be a function with at least one of the inputs being denoted .. The value of . for each line will be the object that is an input to that line.

Value

A checkr_result object with one line for each of the functions in the chain.

Examples

1
2
3
4
code <- for_checkr(quote({x <- 3 %>% sin( ) %>% cos(); x %>% sqrt() %>% log()}))
lineA <- line_chaining(code)
expand_chain(lineA)
expand_all_chains(code)

dtkaplan/checkr2 documentation built on May 17, 2019, 4:01 p.m.