I know that in a graph one can use expression() to include superscripts, e.g.
plot(rnorm(20), xlab = expression(paste("n"^"th")))
However, I literally want to print out superscripts, so I can store them in rtf files later. In fact, I want to use them to indicate the degree of statistical significance associated with my regression coefficients (you know, like "0.24^*").
With "expression(paste("n"^"th"))
", I tried print()
, cat()
, eval()
, and get()
but none of them worked.
I am currently using the "rtf" package to output ".doc" files. If someone suggests using other ways/packages, it is OK if R itself cannot display rich formats in the console, but the results can be stored in some files anyway.