gen_tbl_cust: Generate a tibble

Description Usage Arguments Value Examples

View source: R/generators.R

Description

Generates a tibble of n rows with user-specified columns.

Usage

1
gen_tbl_cust(n, gens)

Arguments

n

The number of rows in the tibble.

gens

A list of functions that take a single argument n and which are used to generate the columns.

Value

A [tibble][tibble::tibble-package] with n rows and length(gens) columns.

Examples

1
2
# A tibble with 7 rows and one column with logical values
gen_tbl_cust(7, list(function(n) sample(c(FALSE, TRUE), n, replace = TRUE)))

paasim/genr documentation built on Dec. 29, 2020, 2:50 a.m.