dot-tib_scalar_impl: Implementation of tib_scalar

.tib_scalar_implR Documentation

Implementation of tib_scalar

Description

Implementation of tib_scalar

Usage

.tib_scalar_impl(
  .key,
  .ptype,
  ...,
  .required = TRUE,
  .fill = vctrs::vec_init(.ptype_inner),
  .ptype_inner = .ptype,
  .transform = NULL,
  .class = NULL,
  .call = caller_env()
)

Arguments

.key

(character) The path of names to the field in the object.

.ptype

(vector(0)) A prototype of the desired output type of the field.

.required

(logical(1)) Throw an error if the field does not exist?

.fill

(vector or NULL) Optionally, a value to use if the field does not exist. Note: this value must match the .ptype_inner of the field (the value before any transformation), not the .ptype.

.ptype_inner

(vector(0)) A prototype of the input field.

.transform

(function or NULL) A function to apply to the whole vector after casting to .ptype_inner.

.class

(character or NULL) Additional classes for the collector.

.call

(environment) The environment to use for error messages.

Value

(tib_scalar) A tibblify scalar collector.


tibblify documentation built on May 9, 2026, 5:07 p.m.