启动 R 时,我收到“错误:在以“C:\U””开头的字符串中没有使用十六进制数字的“\U”

2023-12-22

启动 RStudio 以及尝试从 .rnw 格式编译 PDF 时遇到以下问题:

Error: '\U' used without hex digits in character string starting ""C:\U"

启动 RStudio 或仅启动 R 时,我的控制台内部如下所示:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Global .Rprofile loaded!

Error: '\U' used without hex digits in character string starting ""C:\U"

And this happens when I try to compile a PDF:

Global .Rprofile loaded!

Error: '\U' used without hex digits in character string starting ""C:\U"
Execution halted

这种情况一天又一天地出现,我不知道发生了什么变化。我尝试更新 RStudio 和我的 R 版本,但没有帮助。我在 Windows 上运行 R。

我该如何解决这个问题?


毕竟我能够解决这个问题:

我的 .Rprofile 文件(在文档中)中有一个部分,其中包含“\”而不是“/”。 所以我现在改变了

# Set mainfolder for PACKAGE package
options(PACKAGE_MAINFOLDER="C:\Users\...")

to

# Set mainfolder for PACKAGE package
options(PACKAGE_MAINFOLDER="C:/Users/...")

这样就成功了。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

启动 R 时,我收到“错误:在以“C:\U””开头的字符串中没有使用十六进制数字的“\U” 的相关文章

随机推荐