for_checkr: Translate a sequence of commands into a sequence of quosures

Description Usage Arguments Value Examples

View source: R/for_checkr.R

Description

This function is the first step in any checkr sequence. It scans the quoted commands for parse errors, evaluates the lines one at a time, and packages up the lines into quosures with an environment in which the line should be executed. (That way the lines can be evaluated in a stand-alone manner.)

Usage

1
for_checkr(exprs)

Arguments

exprs

an expression or set of expressions in a curly brace

Value

a quosure for each expression in exs, with an associated environment that reflects the state when that expression was evaluated.

Examples

1
2
3
4
5
code <- for_checkr(quote({x <- 2; y <- x^2; z <- x + y}))
class(code)
passed(code)
line_where(code, Z == "z")
line_where(code, V == 4, Z == "y")

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