Re: [R] How do I paste double quotes arround a character string?

From: Ted Harding <>
Date: Thu, 03 Jul 2008 09:22:14 +0100 (BST)

On 03-Jul-08 01:25:55, Philip James Smith wrote:
> Hi R Community:
> I've got a character string that looks like: New Mexico
> How to I create the new character string that looks like: "New Mexico"
> That is, it is the original string (New Mexico) with double quotes
> infront and behind it?
> Thanks,
> Phil Smith

I tried the following. Is that the sort of thing you want to achieve?

  X<-"New Mexico"
  Y<-"\"New Mexico\""
# [1] "New Mexico"

# [1] "\"New Mexico\""

Best wishes,

E-Mail: (Ted Harding) <> Fax-to-email: +44 (0)870 094 0861
Date: 03-Jul-08                                       Time: 09:22:10
------------------------------ XFMail ------------------------------

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 03 Jul 2008 - 09:10:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jul 2008 - 10:31:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive