Skip to contents

Generate data.frames.

Usage

any_data_frame(rows = c(1L, 10L), cols = c(1L, 10L), any_na = FALSE)

Arguments

rows

Number of rows of the generated data frame. If rows is a single number all data frames will have this number of rows. If rows is a numeric vector of length 2 it will produce data frames with rows between a minimum and maximum, inclusive. For example rows = c(1L, 10L) would produce data frames with rows between 1 and 10. To produce empty tibbles set rows = 0L or a range like rows = c(0L, 10L).

cols

Number of columns of the generated data frame. If cols is a single number all data frames will have this number of columns. If cols is a numeric vector of length 2 it will produce data frames with columns between a minimum and maximum, inclusive. For example cols = c(1L, 10L) would produce data frames with columns between 1 and 10. To produce empty tibbles set cols = 0L or a range like cols = c(0L, 10L).

any_na

Whether NA values should be allowed.

Value

A quickcheck_generator object.

Examples

any_data_frame(rows = 3L, cols = 3L) %>% show_example()
#>         ...1     ...2       ...3
#> 1 -616963937    $uAQ6 2094-02-26
#> 2          0    gZ\\  2076-11-11
#> 3   89206787 AC26oZ3k 1998-06-20