library(pins)
model_board <- board_temp()
cars_lm <- lm(mpg ~ ., data = mtcars)
v <- vetiver_model(cars_lm, "cars_linear")
vetiver_pin_write(model_board, v)
model_board
vetiver_pin_read(model_board, "cars_linear")
# can use `version` argument to read a specific version:
pin_versions(model_board, "cars_linear")
if (FALSE) { # interactive() || identical(Sys.getenv("IN_PKGDOWN"), "true")
# can store an renv lockfile as part of the pin:
vetiver_pin_write(model_board, v, check_renv = TRUE)
}
Run the code above in your browser using DataLab