Search code examples
rsuperscript

How can i superscript a character in R?


Is there a way to add superscript to a character string in R? For example can the '2' here be superscript:

"cm2"

Solution

  • Using unicode, you can check it with the [link][1]

    cat("\U0063\U006D\U00B2")
    cm²