[R] gsub() issue...

Sebastian Gibb lists at sebastiangibb.de
Tue May 17 11:14:51 CEST 2011


Hello Thibault Charles,

> I have the following text :
> text <- ‘’ INFILTRATION INF_BASE
> 
>  AIRCHANGE=1 ‘’
becomes:
text <- "INFILTRATION INF_BASE\nAIRCHANGE=1"

> original <- "INFILTRATION INF_BASE \n AIRCHANGE=1"
There are spaces around "\n". That's why text != original

Try
original <- "INFILTRATION INF_BASE *\n *AIRCHANGE=1"

Bye,

Sebastian



More information about the R-help mailing list