Commit ecdf54f0 authored by houyun's avatar houyun
Browse files

add examples

parent e504b217
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -88,6 +88,10 @@ ggplot_add.magic_text <- function(object, plot, object_name) {
#' @rdname latex_richtext
#' @author Hou Yun
#' @export
#' @examples
#' name <- c("A_2", "B^3", "C_2", "D^{123 + x}")
#' name <- latex_richtext(name)

latex_richtext <- function(x,
                           sup = "^",
                           sub = "_",
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ latex_richtext(x, sup = "^", sub = "_", br = "\\n")
\description{
Helper function to convert a LaTeX string to a rich text.
}
\examples{
name <- c("A_2", "B^3", "C_2", "D^{123 + x}")
name <- latex_richtext(name)
}
\author{
Hou Yun
}