View source: R/tidyllm_schema.R
field_object | R Documentation |
Define a nested object field
field_object(.description = character(0), ..., .vector = FALSE)
.description |
A character string describing the field (optional). |
... |
Named fields to include in the object definition (required). |
.vector |
A logical value indicating if the field is a list of objects (default: FALSE). |
An S7 tidyllm_field
object of type "object" containing nested fields.
# Define an address object with nested fields
address <- field_object("A mailing address",
street = field_chr("Street name"),
city = field_chr("City name"),
zipcode = field_chr("Postal code")
)
# Create a vector of objects
addresses <- field_object("List of addresses",
street = field_chr("Street name"),
city = field_chr("City name"),
.vector = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.