[R] String manipulation
    Webby 
    mailing-list at gmx.net
       
    Sat May  8 16:05:10 CEST 2010
    
    
  
Dear community,
I have a problem with a string conversion:
> text
 [1] ""                   "and"                "\xc1d\xe1m"
 [4] "graphical"          "interface"          "MLP"
 [7] "Nagy"               "networks"           "Networks"
[10] "neural"             "Neural"             "RBF"
[13] "<sodzsu at yahoo.com>" "user"               "with"
[16] "and"                "\xc1d\xe1m"         "graphical"
[19] "interface"          "MLP"
>
I need to get rid off text[3,17] !
I have this kind of control-sequence a few times in my text and I do not get 
rid of it, by strsplit or sub.
> grep("\xc1d\xe1m",text)
Error in grep("\xc1d\xe1m", text) :
  regular expression is invalid in this locale
> grep("\\xc1d\\xe1m",text)
integer(0)
Warning messages:
1: In grep("\\xc1d\\xe1m", text) :
  input string 3 is invalid in this locale
2: In grep("\\xc1d\\xe1m", text) :
  input string 17 is invalid in this locale
Thanks in advance,
Georg
    
    
More information about the R-help
mailing list