ccc_help: Extended class properties

View source: R/ccc.R

ccc_helpR Documentation

Extended class properties

Description

Extended class properties are defined as follows:

  ⁠'arr', 'ARR'⁠   array arrays
  ⁠'mat', 'MAT'⁠ matrix matrices
  ⁠'dtf', 'DTF'⁠ dtf data.frames
  ⁠'vls', 'VLS'⁠ vlist vector-lists  ^{(1)}
  ⁠'gen', 'GEN'⁠ generic vectors, vlists, and arrays
  ⁠'scl', 'SCL'⁠ scalar length-1 generics
  ⁠'mvc', 'MVC'⁠ multivec   length-⁠2+⁠ linear generics
  ⁠'vec', 'VEC'⁠ vec scalars and multivecs
  ^{(1)} Non-data.frame lists.

Usage

ccc_help()

ccc(x)

ccc_funs()

ccc_props()

is_ccc_spec(spec)

CCC(x, spec, ...)

ARR(x, ...)

DTF(x, ...)

GEN(x, ...)

MAT(x, ...)

MVC(x, ...)

SCL(x, ...)

VEC(x, ...)

VLS(x, ...)

Arguments

x

An R object.

spec

NULL or a complete character vec containing one or more xclass properties (i.e., from ccc_props()). Properties may be pipe-delimited. If there are multiple properties in spec, x is inspected for a match to any of the specified properties.

...

Arguments passed on to meets

Functions

  • ccc(): Lists all extended class properties of x. Returns a sorted, lowercase, character vector.

  • ccc_funs(): Lists all extended class property checking functions. Returns a sorted, uppercase, character vector.

  • ccc_props(): Lists all extended class properties. Returns a sorted, lowercase, character vector.

  • is_ccc_spec(): Checks whether spec is an extended class property spec. Returns a logical scalar. See ppp for a definition of a property spec.

  • CCC(): Checks x against the extended class property spec spec. Returns a logical scalar. See ppp for a definition of a property spec.

  • ARR(): Checks x for array-ness. Returns a logical scalar.

  • DTF(): Checks x for dtf-ness. Returns a logical scalar.

  • GEN(): Checks x for generic-ness. Returns a logical scalar.

  • MAT(): Checks x for matrix-ness. Returns a logical scalar.

  • MVC(): Checks x for multivec-ness. Returns a logical scalar.

  • SCL(): Checks x for scalar-ness. Returns a logical scalar.

  • VEC(): Checks x for vec-ness. Returns a logical scalar.

  • VLS(): Checks x for vector-list-ness. Returns 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(), cls(), cmp_ccc_help(), cmp_mmm_ccc_help(), cmp_mmm_help(), compatible(), ddd_prop_funs(), eee_help(), iii_help(), meets(), 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

ccc_funs()
ccc_props()
is_ccc_spec("scl|vls")
CCC(letters, "vec|dtf")
VEC(letters)
ccc(letters)

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