I'm trying to update a package on CRAN, but I'm getting a warning on their automatic check I can't reproduce in R CMD check
. These are the last lines of the log file:
* checking re-building of vignette outputs ... [0s] WARNING
Error(s) in re-building vignettes:
Error: '\R' is an unrecognized escape in character string starting "'D:\temp\R"
Execution halted
R CMD check
passes with no errors in my computer for both Linux and Windows versions and I'm unable to find where is "'D:\temp\R"
being used. There is no file path written in the package vignette at all.
How can I figure out where exactly is the error happening and fix it?
I'm aware how the backslash causes trouble in Windows and most similar questions are related to that, while my problem is at finding out why CRAN did this even when I didn't use file paths at all.
Unfortunately, the RStudio console returns the Error: ‘R’ is an unrecognized escape in character string starting “”C:R”. The reason for this is that the backslash that we have used in the path is an escape character, and we need to specify that somehow in R. So how can we do that?
In this R tutorial you’ll learn how to deal with the Error: ‘R’ is an unrecognized escape in character string starting “”C:R”. Here’s how to do it. The following syntax explains how to replicate the Error: ‘R’ is an unrecognized escape in character string starting “”C:R” in the R programming language.
The following R code explains how to escape a backslash in a character string. To accomplish this, we have to specify a second backslash in front of the backslash that we want to escape. As you can see, the previous character string output contains one backslash.
Furthermore, the letters before and after the backslash have not been returned. The reason for this is that backslashes are treated as special characters in R, and hence we have to apply special rules if we want to use backslashes in character strings. More on that in the next example…
It seems like it was a CRAN problem as mentioned in the comments. I just received an e-mail as if my previous submission was fine, without sending a new form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With