Skip to contents

The model may answer null for it; it comes back as NA. A record comes back as a row of NA (vctrs's missing row) when it requires a member that is one value and is never null, so that no record is a row of NA too; any other optional record is a list column, where NULL is null and a record of nulls is a named list of them (a one-row tibble is still a value, or a default, for it).

Usage

optional(x)

Arguments

x

A type, or a sentence (text, described by it).

Value

A field.

Examples

optional(integer())
#> <functai field> optional whole number
optional("the order number, when the message gives one")
#> <functai field> optional text  # the order number, when the message gives one