启动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"
当我尝试编译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\...")
至
# Set mainfolder for PACKAGE package
options(PACKAGE_MAINFOLDER="C:/Users/...")
这就是窍门。
关于r - 开始R : Error: '\U' used without hex digits in character string starting ""C:\U",我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44273571/