Skip to contents

Integer

A set of generators to produce integer vectors.

Double

A set of generators to produce double vectors.

Numeric

A set of generators to produce numeric vectors. A numeric vector will be an integer or a double vector.

Character

A set of generators to produce character vectors.

Logical

A generator to produce logical vectors.

logical_()
Logical generator

Date

A set of generators to produce date vectors.

POSIXct

A set of generators to produce POSIXct vectors.

hms

A set of generators to produce hms vectors.

Factor

A generator to produce factor vectors.

factor_()
Factor generator

List

A set of generators to produce lists.

list_()
List generator
list_of()
Variable length list generator
flat_list_of()
Variable length flat list generator

Data frame

A set of generators to produce data frames.

tibble_()
Tibble generators
tibble_of()
Random tibble generator
data_frame_()
Data frame generators
data_frame_of()
Data frame generator with randomized columns
data.table_()
data.table generators
data.table_of()
data.table generator with randomized columns

Any

A set of generators to produce random values.

anything()
Any R object generator
any_atomic()
Any atomic vector generator
any_list()
Any list generator
any_flat_list()
Any flat list generator
any_flat_homogeneous_list()
Any flat homogeneous list generator
any_vector()
Any vector generator
any_tibble()
Any tibble generator
any_data_frame()
Any data frame generator
any_data.table()
Any data.table generator
any_undefined()
Any undefined value generator

Other

Other generators.

one_of()
Randomly choose between generators
equal_length()
Equal length vector generator
constant()
Generate the same value every time

Hedgehog

Convert between quickcheck and hedgehog generators.

from_hedgehog()
Convert a hedgehog generator to a quickcheck generator
as_hedgehog()
Convert a quickcheck generator to a hedgehog generator

Test runner

Functions to run property based tests.

for_all()
Test properties of a function
repeat_test()
Repeatedly test properties of a function

Show example

Show an example output value from a generator

show_example()
Show an example output of a generator