Printing UTF-8 characters in R, Rmd, knitr, bookdown

后端 未结 1 1545
走了就别回头了
走了就别回头了 2021-01-14 07:24

UPDATE (April 2018):
The problem still persists, under different settings and computers. I believe it is related to all UNICODE, UTF-8 characters.

https://www.j

相关标签:
1条回答
  • 2021-01-14 07:58

    The only solution that worked was the one suggested by Yihui Xie (knitr developer), which is :
    creating a file .Rprofile, which contains one line Sys.setlocale("LC_CTYPE", "russian") and placing it in your home or working directory.

    However, please note that, it works only with use of kable(), i.e with help of knitr package.
    If you try to print with print(dt$name[1]), you still get Áîðèñ Íåìöîâ.
    However, if you use kable(dt$name[1]), you'll get what you need - Борис Немцов !

    0 讨论(0)
提交回复
热议问题