2

I freshly installed R 3.1.3 on Windows 7. I have two issues when starting RGui:

  • R Console showing me
    Error: '\P' is an unrecognized escape in character string starting ""C:\P"
  • File "Rprofile.site" gets ignored.
No changes made in the file "Rcmd_environ":
R_SHARE_DIR=${R_HOME}/share
R_INCLUDE_DIR=${R_HOME}/include
R_DOC_DIR=${R_HOME}/doc

Program runs under C:\Program Files\R\R-3.1.3\ Any hints or thoughts how to solve this?

Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
VengaVenga
  • 680
  • 1
  • 10
  • 13

1 Answers1

2

The \-character is used for escape sequences (control characters like line breaks (\n, sometimes \r\n), tabs (\t) and others).

If you want a literal \ in a string, you have to escape it with another \, so just write "C:\\P..."

LittleFox
  • 174
  • 1
  • 9