constructor_args <- function(defn) {
names(formals(defn)) %>%
extract(!str_detect(., "^\\."))
}
add_class <- function(x, ...) {
set_class(x, union(c(...), class(x)))
}
is_native <- function(x) {
return((attr(x, pkg_name) %||% FALSE) | inherits(x, pkg_name))
}
make_native_attr <- function(x) {
attr(x, pkg_name) <- TRUE
return(x)
}
make_native_class <- function(x) {
set_class(x, pkg_name)
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.