RStudio data viewer showing Greek characters instead of English

点点圈 提交于 2021-01-29 08:39:33

问题


I am a newbie, loading data (data(iris)) into R. Everything is fine but when I do View(iris), the Species names in the table are shown in a different language. Wondering if there's a bug or something? Please see an example below.

iris

Some details that might be helpful in understanding the issue: R version 4.0.1 (2020-06-06) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)

locale: 1 LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C LC_TIME=English_Australia.1252


回答1:


Try to run Sys.getlocale() in RStudio, maybe you have some config problem in localization:

Sys.getlocale()

If you see something unexpected (like some different language settings etc.), you can set this to all to English:

Sys.setlocale("LC_ALL","English")
#> [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"

See more in documentation - hope this helps!



来源:https://stackoverflow.com/questions/62791304/rstudio-data-viewer-showing-greek-characters-instead-of-english

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!