meets: Evaluate whether an object meets count and/or value...

View source: R/meets.R

meetsR Documentation

Evaluate whether an object meets count and/or value restrictions

Description

Evaluates whether x meets any count and value restrictions are provided in .... If none are provided, returns TRUE.

Usage

meets(x, ...)

Arguments

x

An object.

...

Optional named arguments count and/or value restrictions for x. See the specifying count and value restrictions section.

Value

A logical scalar.

Specifying count and value restrictions

Specifying restrictions in ... is optional. The full set of recognized arguments names are defined in the following table along with the properties each specifies:

  ⁠.max, .maxr, .maxc⁠   Scalar maximum valid numbers of elements, rows, and columns, respectively.
   
  ⁠.min, .minr, .minc⁠ Scalar minimum valid numbers of elements, rows, and columns, respectively.
   
  ⁠.lt, .le, .ge, .gt⁠ Complete sortable scalar less-than, less-than-or-equal, greater-than-or-equal, and greater-than bounds, respectively.
   
  ⁠.n, .nr, .nc⁠ A vector of valid numbers of elements, rows, and columns, respectively.
   
  .vals A vector of valid values.

See Also

Other properties: as_mmm(), bbb_ccc_help(), bbb_help(), bbb_mmm_prop_funs(), ccc_help(), cls(), cmp_ccc_help(), cmp_mmm_ccc_help(), cmp_mmm_help(), compatible(), ddd_prop_funs(), eee_help(), iii_help(), mmm_ccc_help(), mmm_help(), ppp_fast_help(), ppp_help(), sss_ccc_help(), sss_prop_funs(), unq_ccc_prop_funs(), unq_mmm_ccc_help(), unq_mmm_help()

Examples

chrs <- c("a", "b", "c")
nums <- 1:3
sqrd <- matrix(1:16, nrow = 4)
meets(chrs, .n = 1:5)
meets(chrs, .max = 2)
meets(chrs, .min = 3)
meets(sqrd, .nr = 3, .nr = 2:10)
meets(sqrd, .minr = 2, .maxr = 5, .minc = 4, .maxc = 5)
meets(chrs, .vals = letters)
meets(chrs, .gt = "a", .lt = "c")
meets(sqrd, .ge = 1, .le = 16)

j-martineau/uj documentation built on Sept. 14, 2024, 4:40 a.m.