Skip to content
Back to formatted view

Raw Message

Message-ID: <74AC704F-42EA-4C98-B1A7-1A6B2510B8C1@obs-vlfr.fr>
Date: 2005-08-12T21:08:47Z
From: Jean-Pierre Gattuso
Subject: quotes

Hi:

I have been struggling with gsub to no avail and am seeking help from  
the list.

I want to make a vector of the string "one, two, three" and have  
tried to:

     - replace each comma by ","
     - add " at the beginning of the string
     - add " at the end of the string

to issue the command:

     col.names <- c("one", "two", "three")

for use in a data frame.

I have tried gsub to get that but am unable to get the double quote  
and when I try to escape it (\"), I also get the backslash.


Thanks for your help,
jpg