Is there a way to make R strings verbatim (not escaped)?
character, literals, r
Solution
R 4.0.0 introduces raw strings:
dir <- r"(c:\Program files\R)"
https://stat.ethz.ch/R-manual/R-devel/library/base/html/Quotes.html
https://blog.revolutionanalytics.com/2020/04/r-400-is-released.html
Problem
Typical example: ``` path <- "C:/test/path" # great path <- "C:\\test\\path" # also great path <- "C:\test\path" ``` Error: '\p' is an unrecognized escape in character string starting ""C:\test\p" (of course - \t is actually an escape character.) Is there any mark that can be used to treat the string as verbatim? Or can it be coded? It would be really useful when copy/pasting path names in Windows...