#' Generate a LaTeX command from R object
#'
#' @param stat atomic vector
#' @param func character string with name of LaTeX function
#'
#' @return character string
#'
#' @examples
#' a <- 3.145
#' texCmd(a, "pi")
#' @export
#'
texCmd <- function(stat, func){
paste0("\\newcommand{\\", func, "}{", stat, "}")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.