chk_has_dimnames: Check that an array has dimnames

Description Usage Arguments See Also Examples

View source: R/chk-composite.R

Description

Check that an array has dimnames, and that those dimnames have names.

Usage

1
2
3
4
5
6
7

Arguments

x

An array.

name

The name for x that will be used in error messages.

See Also

chk_no_dimnames, chk_array_metadata_complete

Examples

1
2
3
4
5
6
x <- array(1:6,
           dim = 3:2,
           dimnames = list(age = c("0-4", "5-9", "10+"),
                           sex = c("Female", "Male")))
chk_has_dimnames(x, name = "x")
chk_has_names_dimnames(x, name = "x")

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.