eee_help: Effective Dimensionality Properties

View source: R/eee.R

eee_helpR Documentation

Effective Dimensionality Properties

Description

An object's effective dimensionality is defined as the number of dimensions in which it has multiple populated index positions (i.e., if a dimension has only one index position, that is not an effective dimension).

  ⁠'eud', 'EUD'⁠   Effectively NaN dimensional.
  Length-0 objects including NULL (of undefined effective dimensionality).
   
  ⁠'e0d', 'E0D'⁠   Effectively 0 dimensional
  ⁠1x1⁠ data.frames and length-1 vectors, vlists, and arrays.
   
  ⁠'e1d', 'E1D'⁠   Effectively 1 dimensional
  multivecs, length-⁠2+⁠ vlists, row data.frames, column data.frames, and length-⁠2+⁠ arrays with ⁠2+⁠ index positions in exactly 1 dimension.
   
  ⁠'e2d', 'E2D'⁠   Effectively 2 dimensional
  ⁠2+ x 2+ ⁠data.frames and length-⁠4+⁠ arrays with ⁠2+⁠ positions in exactly 2 dimensions.
   
  ⁠'ehd', 'EHD'⁠   Effectively hyper dimensional
   
  Length-⁠8+⁠ arrays with ⁠2+⁠ positions in ⁠3+⁠ dimensions.

Usage

eee_help()

eee(x)

eee_funs()

eee_props()

is_eee_spec(spec)

EEE(x, spec, ...)

E0D(x, ...)

E1D(x, ...)

E2D(x, ...)

EHD(x, ...)

EUD(x, ...)

neee(x)

Arguments

x

An R object.

spec

NULL or a complete character vec containing one or more effective dimensionality properties from eee_props(). Effective dimensionality 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

  • eee(): Lists all effective dimensionality properties possessed by x. Returns a lowercase character scalar.

  • eee_funs(): Lists all effective dimensionality checking functions. Returns a sorted, uppercase, character vector.

  • eee_props(): Lists all effective dimensionality properties. Returns a sorted, lowercase, character vector.

  • is_eee_spec(): Checks whether spec is an effective dimensionality property spec. Returns a logical scalar. See ppp for a definition of a property spec.

  • EEE(): Checks whether x matches the effective dimensionality property spec in spec subject to any count or value restrictions in .... Returns a logical scalar. See ppp for a definition of a property spec.

  • E0D(): Checks whether x is of zero effective dimensions subject to any count or value restrictions in .... Returns a logical scalar.

  • E1D(): Checks whether x is of one effective dimension subject to any count or value restrictions in .... Returns a logical scalar.

  • E2D(): Checks whether x is of two effective dimensions subject to any count or value restrictions in .... Returns a logical scalar.

  • EHD(): Checks whether x is of three or more effective dimensions subject to any count or value restrictions in .... Returns a logical scalar.

  • EUD(): Checks whether x is of undefined effective dimensionality subject to any count or value restrictions in .... Returns a logical scalar.

  • neee(): Gets the effective dimensionality of x. Returns either NaN or a non-negative integer 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(), 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

a. <- "a"
abc. <- c("a", "b", "c")
udf1 <- NULL
udf2 <- character(0)
udf3 <- matrix(nrow = 0, ncol = 0)
udf4 <- list()
zro1 <- a.
zro2 <- list(abc = abc.)
zro3 <- data.frame(a = a.)
zro4 <- array(a., dim = c(1, 1, 1))
one1 <- matrix(abc., nrow = 1)
one2 <- matrix(abc., ncol = 1)
one3 <- data.frame(a. = abc.)
one4 <- array(abc., dim = c(3, 1, 1))
two1 <- matrix(rep.int(abc., 2), nrow = 2)
two2 <- data.frame(a = abc., b = abc.)
two3 <- array(1:4, dim = c(2, 2, 1))
two4 <- array(1:4, dim = c(1, 2, 2, 1))
hyp1 <- array(1:8, dim = c(2, 2, 2))
hyp2 <- array(1:8, dim = c(2, 2, 2, 1))
hyp3 <- array(1:8, dim = c(1, 2, 2, 2, 1))
hyp4 <- array(1:16, dim = c(2, 2, 2, 2))

eee_funs()
eee_props()
is_eee_spec("eud")
is_eee_spec("d1d")
c(neee(udf1), neee(udf2), neee(udf3), neee(udf4))
c(neee(zro1), neee(zro2), neee(zro3), neee(zro4))
c(neee(one1), neee(one2), neee(one3), neee(one4))
c(neee(two1), neee(two2), neee(two3), neee(two4))
c(neee(hyp1), neee(hyp2), neee(hyp3), neee(hyp4))
c(EEE(one1, "eud"), EEE(one1, "e0d"), EEE(one1, "e1d"), EEE(one1, "e2d"), EEE(one1, "ehd"))
c(EUD(one1), E0D(one1), E1D(one1), E2D(one1), EHD(one1))
c(eee(udf1), eee(zro1), eee(one1), eee(two1), eee(hyp1), eee(hyp4))

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