Search code examples
rspecial-characters

How to use registered, trademark or special symbols (other than Greek alphabets) in R, especially in plot headings?


I am trying to use the registered, trademark symbols in one of my R graphs. Is there are a way to present these special characters via codes or other identifiers?

Thanks!


Solution

  • You can just include them in the string. You can either put the actual character in the string or use the unicode escape

    layout(matrix(1:4, ncol=2))
    plot(1,1,main="Registered®")
    plot(1,1,main="Registered\U00AE")
    plot(1,1,main="TradeMark™")
    plot(1,1,main="TradeMark\U2122")
    

    enter image description here