1

How would like to print this text <th scope="row"> in a paste function. Because I need to escape the quotation marks, I have tried this

paste("<th scope=\"row\">")
[1] "<th scope=\"row\">"

I also tried to follow the golden rule from the first comment to this question How to escape a backslash in R?, i.e. adding slashes until it works. But it did not.

Community
  • 1
  • 1
Dambo
  • 3,098
  • 3
  • 27
  • 71

1 Answers1

1

Just use a combination of single quote and double quote.

paste("<th scope='row'>")
[1] "<th scope='row'>"

Regards, Andrey

brumberg
  • 23
  • 1
  • 1
  • 6