#'
#' Prepend a class attribute to existing class attribute
#'
#' @param x An object
#' @param className Class name to prepend to existing class attribute of x
#' @return Returns x with updated class attribute
#' @examples
#' prependClass(mtcars, "Foo") |> class()
#' @export
#'
prependClass = function(x, className) {
decl(className, is.character)
structure(x, class = c(className, class(x)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.