[R] Very simple question

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Fri Apr 8 12:50:10 CEST 2011


Hi,
try
paste(teste,collapse="+")

cheers.

Am 08.04.2011 12:44, schrieb Ronaldo Reis Junior:
> Hi,
> 
> I have a very simple doubt.
> 
> Look:
> 
>> teste <- c("A","B","C")
> 
>> teste2 <- paste(teste[1],teste[2],teste[3],sep="+")
>> teste2
> [1] "A+B+C"
>>
> 
> How to make it automatic, like I try to use paste(teste,sep="+") but the
> paste dont get the teste elements separately to join again in a unique
> element.
> 
> Exist any function to associated with paste make this result more
> automatically.
> 
> Thanks
> Ronaldo
> 


-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790



More information about the R-help mailing list