View source: R/goose_essentials.R
| goose_give_sample | R Documentation |
Captures the structure and sample values of an R object and saves it in a format that Goose can understand and reference when providing code. This enables Goose to write accurate code that references actual column names and understands data types.
goose_give_sample(object, name = NULL, rows = 5, save_to_memory = TRUE)
object |
An R object (data.frame, matrix, tibble, list, etc.) |
name |
Optional custom name for the object. Defaults to the object's name. |
rows |
Number of sample rows to include (default: 5) |
save_to_memory |
Whether to save to Goose memory (default: TRUE) |
Invisible NULL. Prints object summary and saves to memory.
## Not run:
# Share a data frame with Goose
goose_give_sample(mtcars)
# Share with custom name
goose_give_sample(iris, "flower_data")
# Share just structure without saving
goose_give_sample(my_model, save_to_memory = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.