#' ggplot Percent Labels
#'
#' This function allows for custom percentage labels in ggplot2.
#'
#' @param theargument label for ggplot
#' @param siglevel significant figures
#'
#' @return label for ggplot2
#'
#'
#' @export
ggplot_percent_label <-function(theargument, siglevel=3) {
stopifnot(is.numeric(theargument))
paste(signif(theargument, siglevel) * 100, "%", sep="")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.