#' Add a new class to object in addition to existing classes
#'
#' @importFrom tibble tibble
#' @param x object to add class to
#' @param class string. class to add.
#' @param position the position in which to add the class
#' @returns object 'x' but with new class added
#' @examples
#' x <- add_class(tibble::tibble(), "NEW", 1)
#' class(x)
#'
#' @export
add_class <- function(x, class, position = 1) {
c0 <- class(x)
class(x) <- add_by_position(c0, class, position)
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.