Skip to contents

Construct data frame generators in a similar way to base::data.frame.

Usage

data_frame_(..., rows = c(1L, 10L))

Arguments

...

A set of name-value pairs with the values being vector generators.

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).

Value

A quickcheck_generator object.

Examples

data_frame_(a = integer_()) %>% show_example()
#>       a
#> 1 -6634
#> 2 -3670
#> 3   916
#> 4 -4091
data_frame_(a = integer_(), b = character_(), rows = 5L) %>% show_example()
#>       a        b
#> 1  -400   %/(9Wq
#> 2 -1284   OmR*l#
#> 3  1392    G;U`b
#> 4  1523 3cf&*(&a
#> 5 -8185  #,I`SgF