vctrs (version 0.1.0)

vec_assert: Assert an argument has known prototype and/or size

Description

Assert an argument has known prototype and/or size

Usage

vec_assert(x, ptype = NULL, size = NULL)

Arguments

x

A vector argument to check.

ptype

Prototype to compare against.

size

Size to compare against

Value

Either an error, or x, invisibly.