Front-end to ggplot2 labs Function

hlabs(x, y, html = FALSE)

Arguments

x

a single variable name, unquoted

y

a single variable name, unquoted

html

set to TRUE to render in html (for plotly), otherwise the result is plotmath expressions

Value

result of ggplot2::labs()

Details

Runs x, y, or both through hlab() and passes the constructed labels to the ggplot2::labs function to specify x- and y-axis labels specially formatted for units of measurement

Author

Frank Harrell

Examples

# Name the current dataset d, or specify a name with
# options(curr_ds='...') or run `extractlabs`, then
# ggplot(d, aes(x,y)) + geom_point() + hlabs(x,y)
# to specify only the x-axis label use hlabs(x), or to
# specify only the y-axis label use hlabs(y=...)