[R] Replacing ' (apostrophe) with "(two apostrophe)

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Jan 27 13:21:37 CET 2010



On 27.01.2010 06:45, Steven Kang wrote:
> Hi all,
>
>
> I am trying to replace a string containing ' (apostrophe) with "(two
> apostrophes not inverted commas).
>
> i.e
>
> *asdf'qwer* replaced to *asdf"qwer*
>
> Is this feasible?


gsub("'", '"', "asdf'qwer")

Uwe Ligges


> Thanks .
>
>
>



More information about the R-help mailing list