Skip to contents

All functions

Ops(<type>)
Union of two types
as.list(<typed_instance>)
Convert an instance to a list
as_s7_class()
Turn a struct into an S7 class
as_type()
Interpret a value as a type
date() datetime()
Date and time types
desc() `%doc%`
Attach a description to a type's schema
describe()
Describe a struct and its fields
extend()
Subclass a struct
fct()
Factor type
fields()
Field names of a struct or an instance
fn()
Define a typed function
fn_type()
Type for a typed function with a particular signature
frame()
Data frame type
from_json()
Parse and validate JSON in one step
from_list()
Parse a plain list into a struct
`%default%`
Attach a default to a type
`$`(<typed_instance>) `[[`(<typed_instance>)
Read a field of an instance
`$<-`(<typed_instance>) `[[<-`(<typed_instance>) `[<-`(<typed_instance>)
Set a field of an instance
is_valid()
Does a value satisfy a type?
list_of()
List types
map_of()
Map types
new_type()
Create a type
no_na()
Reject missing values
one_of()
Enumeration of literal values
opt()
Make a type optional
parse_as()
Validate a value against a type
partial()
Make every field of a struct optional
int() num() chr() lgl() anything() null_t()
Primitive vector types
print(<type>)
Print a type
print(<typed_fn>)
Print a typed function's signature
print(<typed_instance>)
Print an instance
print(<typed_struct>)
Print a struct
ref()
Refer to a struct by name
s7_struct()
Define an S7 class with rdantic field types
s7_type()
Use an S7 class as a type
schema()
JSON Schema for a type
struct()
Define a record type
`[`(<type>)
Fix a type's length, or add a constraint
to_ellmer_type()
Convert an rdantic type or schema to an ellmer type
to_json()
Serialise to JSON, guided by the declared types
to_list()
Convert an instance to plain lists
try_parse()
Validate without throwing
type_from()
Build a type from a predicate
type_of()
Describe the type of a value the way rdantic names types
typed_fn()
Type for any typed function