Learn R Programming

visdat (version 0.5.3)

expect_frame: Create a dataframe to help visualise 'expected' values

Description

Create a dataframe to help visualise 'expected' values

Usage

expect_frame(data, expectation)

Value

data.frames where expectation are true

Arguments

data

data.frame

expectation

unquoted conditions or "expectations" to test

Author

Stuart Lee and Earo Wang

Examples

Run this code

if (FALSE) {
dat_test <- tibble::tribble(
            ~x, ~y,
            -1,  "A",
            0,  "B",
            1,  "C"
            )

expect_frame(dat_test,
             ~ .x == -1)
}

Run the code above in your browser using DataLab