Skip to contents

Append the HTML entity for a circumflex (“hat”, as in an estimator \(\hat{x}\)) or macron (“bar”, as in a sample mean \(\bar{x}\)) to a label.

Usage

htmlHat(x)

htmlBar(x)

Arguments

x

a character vector, typically a variable name or symbol

Value

a character vector with the diacritic's HTML entity appended

Examples

htmlHat("p")  # -> "p̂"   (renders as p with a circumflex)
#> [1] "p̂"
htmlBar("x")  # -> "x̄"   (renders as x with a macron)
#> [1] "x̄"