I want to write \sigma^2_i
using unicode I can get two-thirds of the way there with:
"\u03C3\U00B2"
I can't for the life of me figure out how to add subscript. According to this site where I got the unicode for superscript 2 the correct unicode for subscript i is "\u1D62"
, but in R this does not print subscript i.
I know that for text in plots you can use expression
, but this is not for a plot, so expression
does not work.
Any help would be appreciated.
edit: it appears that using cat
evaluates unicode in cases when just printing doesn't necessarily evaluate the unicode. I still don't understand why the unicode characters are inconsistent. Per this website the unicode character for subscript k is "\u2096"
, but cat("\u2096")
prints a thick |