Skip to contents

Construct tibble generators in a similar way to tibble::tibble.

Usage

tibble_(..., 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

tibble_(a = integer_()) %>% show_example()
#> # A tibble: 6 × 1
#>       a
#>   <int>
#> 1  4988
#> 2  2441
#> 3 -6950
#> 4  3530
#> 5 -3635
#> 6 -6203
tibble_(a = integer_(), b = character_(), rows = 5L) %>% show_example()
#> # A tibble: 5 × 2
#>       a b        
#>   <int> <chr>    
#> 1 -4756 2&3v     
#> 2  7519 a~Glul}  
#> 3  2904 ;=]g     
#> 4  -564 MW&_2AHUS
#> 5 -2818 'm^gqd~!