gpt4 book ai didi

r - Windows 上 RStudio 上的不可读消息

转载 作者:可可西里 更新时间:2023-11-01 10:19:54 26 4
gpt4 key购买 nike

我使用 RStudio 作为 R 的前端。它在 GNU/Linux 上完美运行(即使是俄语语言环境和俄语消息)。然而,在 Windows 上它的效果更差。问题出在消息的字体或字符集上。

我安装了 RStudio 版本 0.99.467 (AMD64) 和 R 版本 3.2.1 (2015-06-18)。

我在开头看到以下提示(没问题,语言环境是 en_US,英语):

R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 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.

但是当我尝试做错事时,假设尝试加载未安装的包,我看到不可读的错误消息。

> library(abcdef)
Error in library(abcdef) : íåò ïàêåòà ïîä íàçâàíèåì ‘abcdef’

如何让它可读?

顺便说一句,这个问题出现在RStudio中。 RGui 工作正常(即使是俄语消息,也没有可疑字母):

> library(abcdef)
Ошибка в library(abcdef) :нет пакета под названием ‘abcdef’

(未安装软件包“abcdef”)。

不确定从哪里开始挖掘。它甚至可以解决吗?还是 RStudio 中的错误?

最佳答案

我认为问题是您的系统上没有非 Unicode 俄语字符集 (1251)。

确保在控制面板 > 区域 > 管理 > 更改系统区域设置中将区域设置设置为俄语,然后重新启动系统并检查问题是否仍然存在。

或者您可以通过将 language = EN 添加到 R 的 \etc\ 目录中的 RConsole 文件( C:\Program Files\R\R-x.x.x\etc\ 默认)。

关于r - Windows 上 RStudio 上的不可读消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31585287/

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