gpt4 book ai didi

r - 我得到 'Error: '\U' used without hex digits in string starting ""C :\U"' when starting R

转载 作者:可可西里 更新时间:2023-11-01 09:47:19 28 4
gpt4 key购买 nike

我在启动 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\...")

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

这就成功了。

关于r - 我得到 'Error: '\U' used without hex digits in string starting ""C :\U"' when starting R,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44273571/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com