dump("x", file = "x.R")
file.show("x.R") 

will get you most of the way.

-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Steven Kang
Sent: Wednesday, 29 September 2010 3:11 PM
To: r-help@r-project.org
Subject: [R] String split and concatenation

Hi R users,


I desire to transform the following vector consisting of repeated characters

x <- rep(letters, 3)
into this exact format (i.e a single string containing each characters in
quotation mark separated by comma between each; al ).

("a", "b", "c", "d", ........"a", "b", "c", "d", ..........., "a", "b", "c",
"d", ........."z")

Any advice would be much appreciated.



-- 
Steven

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

______________________________________________
R-help@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.

Reply via email to