Sorry for not including those details. Here is a more detailed description:
> 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"
> sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: i386-pc-mingw3
t;\\numeric=<<12>>" "alpha=<>\\numeric=<<34>>"
> cat(.Last.value, sep="\n") # see what is really in the strings
alpha=<>\numeric=<<12>>
alpha=<>\numeric=<<34>>
I don't know about your unicode/encodi
;" "alpha=<>\\numeric=<<34>>"
> > cat(.Last.value, sep="\n") # see what is really in the strings
> alpha=<>\numeric=<<12>>
> alpha=<>\numeric=<<34>>
>
> I don't know about your unicode/encodin
You forgot the 'at a minimum' information required by the posting
guide.
Most likely this is a limitation of the locale you used (and failed to
tell us about) on the OS you used (...).
On Sat, 16 Jul 2011, Sverre Stausland wrote:
Dear helpers,
I'm trying to replace a character with a unico
Don't know the answer to you first question, but for the \\ see below.
On Sat, Jul 16, 2011 at 7:19 PM, Sverre Stausland
wrote:
> Unrelated to that problem, but related to gsub() is that I can't find
> a way for gsub() to interpret the backslash as a character. In regular
> expression, \\ should
what is really in the strings
alpha=<>\numeric=<<12>>
alpha=<>\numeric=<<34>>
I don't know about your unicode/encoding problem.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-proj
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 fr
7 matches
Mail list logo