Skip to contents

Types are values, so most of the API accepts either a type, NULL (meaning the null type), a string (meaning a struct looked up by name) or an S7 class (see s7_type()).

Usage

as_type(x)

Arguments

x

A type, NULL, a struct name, or an S7 class.

Value

A type.

Examples

as_type(int)
#> <type> int
as_type(NULL)
#> <type> NULL
as_type("User")
#> <type> User