Write a deployable Plumber file for a vetiver modelSource:
vetiver_write_plumber( board, name, version = NULL, ..., file = "plumber.R", rsconnect = TRUE )
Retrieve a specific version of a pin. Use
pin_versions()to find out which versions are available and when they were created.
Other arguments passed to
vetiver_api()such as the endpoint
A path to write the Plumber file. Defaults to
plumber.Rin the working directory. See
plumber::plumb()for naming precedence rules.
Create a Plumber file with features needed for RStudio Connect? Defaults to
By default, this function will find and use the latest version of your
vetiver model; the model API (when deployed) will be linked to that specific
version. You can override this default behavior by choosing a specific
library(pins) tmp <- tempfile() b <- board_temp(versioned = TRUE) cars_lm <- lm(mpg ~ ., data = mtcars) v <- vetiver_model(cars_lm, "cars_linear") vetiver_pin_write(b, v) #> Creating new version '20220929T181236Z-2bb55' #> Writing to pin 'cars_linear' vetiver_write_plumber(b, "cars_linear", file = tmp)