vetiver_create_rsconnect_bundle | R Documentation |
Use vetiver_create_rsconnect_bundle()
to create a
Posit Connect model API bundle for a
vetiver_model()
that has been versioned and stored via
vetiver_pin_write()
.
vetiver_create_rsconnect_bundle(
board,
name,
version = NULL,
predict_args = list(),
filename = fs::file_temp(pattern = "bundle", ext = ".tar.gz"),
additional_pkgs = character(0)
)
board |
A pin board, created by |
name |
Pin name. |
version |
Retrieve a specific version of a pin. Use |
predict_args |
A list of optional arguments passed to |
filename |
The path for the model API bundle to be created (can be
used as the argument to |
additional_pkgs |
Any additional R packages that need to be attached
via |
This function creates a deployable bundle. See Posit Connect docs for how to deploy this bundle, as well as the connectapi R package for how to integrate with Connect's API from R.
The two functions vetiver_create_rsconnect_bundle()
and
vetiver_deploy_rsconnect()
are alternatives to each other, providing
different strategies for deploying a vetiver model API to Posit Connect.
The location of the model API bundle filename
, invisibly.
vetiver_write_plumber()
, vetiver_deploy_rsconnect()
library(pins)
b <- board_temp(versioned = TRUE)
cars_lm <- lm(mpg ~ ., data = mtcars)
v <- vetiver_model(cars_lm, "cars_linear")
vetiver_pin_write(b, v)
## when you pin to Posit Connect, your pin name will be typically be like:
## "user.name/cars_linear"
vetiver_create_rsconnect_bundle(
b,
"cars_linear",
predict_args = list(debug = TRUE)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.