View source: R/tidyllm_schema.R
field_chr | R Documentation |
These functions create field descriptors used in tidyllm_schema()
or field_object()
to define JSON schema fields. They support character, factor, numeric, and logical types.
field_chr(.description = character(0), .vector = FALSE)
field_fct(.description = character(0), .levels, .vector = FALSE)
field_dbl(.description = character(0), .vector = FALSE)
field_lgl(.description = character(0), .vector = FALSE)
.description |
A character string describing the field (optional). |
.vector |
A logical value indicating if the field is a vector (default: FALSE). |
.levels |
A character vector specifying allowable values (for |
An S7 tidyllm_field
object representing the field descriptor.
field_chr("A common street name")
field_fct("State abbreviation", .levels = c("CA", "TX", "Other"))
field_dbl("House number")
field_lgl("Is residential")
field_dbl("A list of appartment numbers at the address",.vector=TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.