# Following guide here: https://rstudio.github.io/reticulate/articles/package.html
# global reference to python packages (will be initialized in .onLoad)
boto3 <- NULL
sagemaker <- NULL
.onLoad <- function(libname, pkgname) {
# using superassignment to update global reference to python packages
boto3 <<- reticulate::import("boto3", delay_load = TRUE)
sagemaker <<- reticulate::import("sagemaker", delay_load = TRUE)
}
utils::globalVariables(".")
utils::globalVariables(":=")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.