Displaying 1 result from an estimated 1 matches for "u0254".
Did you mean:
50254
2011 Jul 17
3
gsub() with unicode and escape character
Dear helpers,
I'm trying to replace a character with a unicode code inside a data
frame using gsub(), but unsuccessfully.
> data.frame(animals=c("dog","wolf","cat"))->my.data
> gsub("o","\u0254",my.data$animals)->my.data$animals
> my.data$animals
[1] "d??g" "w??lf" "cat"
It's not that a data frame cannot have unicode codes, cf. e.g.
> data.frame(animals=c("d\u0254g","w\u0254lf","cat"))->my.data.2
> my.d...