assert_cols: Assert That a Data Frame Selection Matches the Specified Type...

View source: R/assert.R

assert_colsR Documentation

Assert That a Data Frame Selection Matches the Specified Type and Length

Description

assert_cols() checks whether columns selected using ... match the given prototype and/or number of columns. If so, it returns the data frame; otherwise, it throws an error.

Usage

assert_cols(.data, ..., ptype = NULL, n = NULL)

Arguments

.data

A data frame or data frame extension (e.g. a tibble)

...

<tidy-select> One or more selection specifications for a set of columns in the dataframe

ptype

The prototype that the selected columns should match

n

The number of columns that should be selected

Value

The input object, .data


jesse-smith/coviData documentation built on Jan. 14, 2023, 11:08 a.m.