Manipulating files with non-English names in R

前端 未结 2 698
感情败类
感情败类 2020-12-17 00:51

When using the R functions to manipulate files in Windows, e.g. dir(), those with non-English characters, like Cyrillic, are presented as a sequence of \"?\".

2条回答
  •  长情又很酷
    2020-12-17 01:08

    try this: iconv("привет.txt","UTF-8","CP1251")

    Convert Character Vector between Encodings:
    https://stat.ethz.ch/R-manual/R-devel/library/base/html/iconv.html

    The iconv library:
    http://www.delorie.com/gnu/docs/recode/recode_30.html

提交回复
热议问题