conversion of string vector into single string

Shawn Boles (shawn@luthien.ori.org)
Thu, 29 Jan 1998 16:23:02 -0800


Hi All:

I want to convert a string vector:

ju
[1] "dcf01" "dcf02a" "dcf02b" "dcf02c" "dcf02d" "dcf02e" "dcf02f" "dcf03"
>

into a single string:

> ju1
[1] "dcf01 dcf02a dcf01 dcf02a dcf02b dcf02c dcf02d dcf02e dcf02f dcf03"
>

code below works, _but_ requires a 'for' loop.

ju1<-character()
> for(i in 1:length(ju)){
+ ju1<-paste(ju1,ju[i])}
>

Is there a better way?

Thanks in advance,

Shawn Boles

Oregon Research Institute Internet: shawn@ori.org
1715 Franklin Blvd. Voice: (541) 484-2123 Ext. 225
Eugene, Oregon /97403-1983 USA Fax: (541) 484-1108

....................... non nova, sed novae .........................