[R] how to change "`Year_Month)201103`" into "Year_Month)201103" using R?

Marc Girondot marc_grt at yahoo.fr
Thu Mar 14 09:56:00 CET 2013


Le 14/03/13 09:23, Tammy Ma a écrit :
> HI,
>
> I have the pattern like "`Year_Month)201103`"   I want to delete single quotes within double quetes.
> I want to change it into "Year_Month)201103" , how to do it in r?
>
> Thanks a lot.
>
> Tammy
>
>
 > x <- "\"`Year_Month)201103`\""
 > cat(x)
"`Year_Month)201103`"
 > cat(gsub("`", "", x))
"Year_Month)201103"

Sincerely
Marc

-- 
__________________________________________________________
Marc Girondot, Pr

Laboratoire Ecologie, Systématique et Evolution
Equipe de Conservation des Populations et des Communautés
CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079
Bâtiment 362
91405 Orsay Cedex, France

Tel:  33 1 (0)1.69.15.72.30   Fax: 33 1 (0)1.69.15.73.53
e-mail: marc.girondot at u-psud.fr
Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
Skype: girondot



More information about the R-help mailing list