问题
I am trying to output a .xlsx file with a column name that has superscripted text.
for example like:
holdings=data.frame("x"=rep(12,4), "y"=rep(14, 4))
colnames(holdings)=c("Name","RankTM")
but with the "TM" superscripted.
Anyone able to help?
回答1:
I suggest not doing that. Column names should be plain text but you may have a good reason for doing this.
Find the unicode for TM
(2122) and escape it like so \u\+###
. eg: colnames(holdings) = c("Name","Rank\u2122")
来源:https://stackoverflow.com/questions/48877641/superscripts-in-r