| goose_save | R Documentation |
Save an R object to Goose's memory system with optional tags and category. Objects are serialized to RDS format and metadata is stored in Goose's text format.
goose_save(
object,
name,
category = "r_objects",
tags = NULL,
description = NULL,
global = TRUE,
overwrite = FALSE
)
object |
The R object to save (can be any R object: data.frame, model, list, etc.) |
name |
Character string. Name for the saved object (will be used as filename) |
category |
Character string. Category for organizing memories (default: "r_objects") |
tags |
Character vector. Optional tags for searching/filtering |
description |
Character string. Optional description of the object |
global |
Logical. If TRUE (default), saves to global Goose memory. If FALSE, saves to project-local memory. |
overwrite |
Logical. If TRUE, overwrites existing object. If FALSE (default), errors if object exists. |
Invisibly returns the path where the object was saved
## Not run:
# Save a model
model <- lm(mpg ~ wt, data = mtcars)
goose_save(model, "mtcars_model",
category = "models",
tags = c("regression", "mtcars"),
description = "Linear model predicting mpg from weight")
# Save a data frame
goose_save(iris, "iris_data",
category = "datasets",
tags = "example")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.