R/getFonts.r

Defines functions getFonts

Documented in getFonts

getFonts <- function(font){

    ## helper function used by table{Continuous, Nominal}
    fontify <- if(font == ""){
        function(label, prefix){label}} else {
        function(label, prefix){paste("\\", prefix, font, "{", label, "}", sep = "")}
        }

    return(list(math =
                ## function to format math in the header line 
                function(label)math(fontify(label, prefix="math")),
                text=
                ## function to format text in the header line 
                function(label) fontify(label, prefix="text")))    
}

Try the reporttools package in your browser

Any scripts or data that you put into this service are public.

reporttools documentation built on Oct. 12, 2021, 5:06 p.m.