r - 错误: '\P' is an unrecognized escape in character string starting ""C:\P"

标签 r installation

我在 Windows 7 上新安装了 R 3.1.3。启动 RGui 时遇到两个问题:

  • R 控制台向我展示
    错误:“\P”是以“C:\P”开头的字符串中无法识别的转义符
  • 文件“Rprofile.site”被忽略。
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

程序在C:\Program Files\R\R-3.1.3\下运行 有任何提示或想法如何解决这个问题吗?

最佳答案

\ 字符用于转义序列(控制字符,例如换行符(\n,有时为 \r\n),选项卡(\t)和其他)。

如果您想在字符串中使用文字 \,则必须使用另一个 \ 对其进行转义,因此只需编写 "C:\\P.. ”

关于r - 错误: '\P' is an unrecognized escape in character string starting ""C:\P",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29684945/

相关文章:

r - 集成方法,在 R 中命中注定

r - 如何提取R中的特定行?

windows - 如何在 Windows 上使用 OCam 安装 OCaml?

r - 设置证书验证位置时出错,install_github

php - 在 Windows 上的 MAMP 上安装 Composer

r - 是否有可能在 R 中转义 "["

r - 使用 ctree 制作具有最大深度的过拟合树

html - 网页抓取:网页抓取的对象与网站上的信息不匹配并导致 RStudio 崩溃

python - pip install `unicode` 错误中加密安装失败

python - 导入错误: cannot import name porter python