bbb_help: Basic Properties

View source: R/bbb.R

bbb_helpR Documentation

Basic Properties

Description

An object's basic properties are defined by its fundamental structure as follows:

  ⁠'atm', 'ATM'⁠   atomic-ness Atomic (but not NULL). Both a basic and an xmode property.
   
  ⁠'fun', 'FUN'⁠ ⁠function-ness⁠ A function or a character scalar name of a function accessible from the environment of the calling function.
   
  ⁠'rcr', 'RCR'⁠ recursive-ness   data.frame or list.
  ⁠'pop', 'POP'⁠ populated-ness Length 1 or greater.
  ⁠'def', 'DEF'⁠ defined-ness Not NULL.
  ⁠'nll', 'NLL'⁠ null-ness NULL.
  ⁠'nil', 'NIL'⁠ nil-ness Length 0 but not NULL.

Usage

bbb_help()

bbb(x)

bbb_funs()

bbb_props()

is_bbb_spec(spec)

BBB(x, spec, ...)

ATM(x, ...)

DEF(x, ...)

FUN(x, ...)

NIL(x)

NLL(x)

POP(x, ...)

RCR(x, ...)

Arguments

x

An R object.

spec

NULL or a complete character vec containing one or more basic properties from bbb_props(). basic 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

  • bbb(): Lists all basic properties of x. Returns a sorted, lowercase, character vector.

  • bbb_funs(): Lists all basic-property-checking functions. Returns a sorted, uppercase, character vector.

  • bbb_props(): Lista all basic properties. Returns a sorted, lowercase, character vector.

  • is_bbb_spec(): Checks whether spec is a basic property spec. Returns a logical scalar. See ppp for a definition of a property spec.

  • BBB(): Checks x against the basic property spec spec subject to any count or value restrictions in .... Returns a logical scalar. See ppp for a definition of a property spec.

  • ATM(): Checks x atomic-ness subject to any count or value restrictions in .... Returns a logical scalar.

  • DEF(): Checks x for defined-ness subject to any count or value restrictions in .... Returns a logical scalar.

  • FUN(): Checks x for function-ness subject to any count or value restrictions in .... Returns a logical scalar.

  • NIL(): Checks x ni-lness subject to any count or value restrictions in .... Returns a logical scalar.

  • NLL(): Checks x for null-ness subject to any count or value restrictions in .... Returns a logical scalar.

  • POP(): Checks x for populated-ness subject to any count or value restrictions in .... Returns a logical scalar.

  • RCR(): Checks x for recursive-ness subject to any count or value restrictions in .... 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_mmm_prop_funs(), ccc_help(), 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

bbb_funs()
bbb_props()
is_bbb_spec("nil|nll")
BBB(NULL, "nil|nll")
POP(NA)
ATM(list(letters))
bbb(NA)

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