.onAttach <- function(libname, pkgname) {
}
#' @export
np <- NULL
.onLoad <- function(libname, pkgname) {
delayedAssign("np", reticulate::import("numpy", delay_load = TRUE, convert = FALSE),
eval.env = baseenv(), assign.env = getNamespace(pkgname))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.