check_dims: Check vector/matrix/data.frame for expected dimensions or...

Description Usage Arguments Value Examples

View source: R/stray_utils.R

Description

Check vector/matrix/data.frame for expected dimensions or throw error

Usage

1
check_dims(x, d, par)

Arguments

x

object to check

d

expected dimensions

par

character name of x (for error message)

Value

nothing if no error, otherwise throws error

Examples

1
2
y <- c(1,3,4)
check_dims(y, 3, "y")

jsilve24/mongrel documentation built on Jan. 27, 2022, 9:54 p.m.