[R] gsub() issue...

Thibault Charles thibault.charles at solamen.fr
Tue May 17 11:33:01 CEST 2011


Hello,

Thanks but it doesn't work and I cannot understand why...

Thibault Charles
Solamen
Audencia - 8 route de la Jonelière
44300 Nantes
+33 2 40 37 46 76

-----Message d'origine-----
De : r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] De
la part de Sebastian Gibb
Envoyé : mardi 17 mai 2011 11:15
À : r-help at r-project.org
Objet : Re: [R] gsub() issue...

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

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list