[R] Export Unicode characters from R
johnsen at fas.harvard.edu
Fri Jul 15 01:11:22 CEST 2011
I am not able to export Unicode characters from R. Below is an example
where the Unicode character is correctly rendered as long as I am stay
within R. When I export it, the character appears only with its basic
code, and the same happens when I import it back into R . I'm using R
2.13.1 in Windows XP.
> funny.g <- "\u1E21"
> data.frame (funny.g) -> funny.g
> write.table (funny.g, file = "C:/~funny.g.txt", col.names = FALSE, row.names = FALSE, quote = FALSE, fileEncoding = "UTF-8")
> read.table ("C:/~funny.g.txt", header = FALSE, encoding = "UTF-8") -> input.funny.g
More information about the R-help