optional: Create an optional S7 type

View source: R/types.R

optionalR Documentation

Create an optional S7 type

Description

Creates an S7 union type that allows for the specified type or NULL.

Usage

optional(type)

Arguments

type

S7 base class or S7 class.

Value

An S7 union type that allows for the specified type or NULL.

Author(s)

EDG

Examples

# Create an optional character type
optional(S7::class_character)

rtemis.core documentation built on April 22, 2026, 1:11 a.m.