gen_tbl: Generate a tibble

Description Usage Arguments Value Examples

View source: R/generators.R

Description

Generates a tibble of n rows with user-specified column types.

Usage

1
gen_tbl(n, types)

Arguments

n

The number of rows in the tibble.

types

The types for the columns in the data. The representation follows the convention specified in the readr-package and the types available are c = character, i = integer, d = double, l = logical, D = date.

Value

A [tibble][tibble::tibble-package] with n rows and nchar(types) columns.

Examples

1
2
# A tibble with 42 rows and one character, one date and one integer column
gen_tbl(42, "cDi")

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