[R] Very simple question

From: Ronaldo Reis Junior <chrysopa_at_gmail.com>
Date: Fri, 08 Apr 2011 07:44:00 -0300


I have a very simple doubt.


> 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.


17ª lei - Seu orientador quer que você se torne famoso,
           de modo que ele possa, finalmente, se tornar famoso.

       --Herman, I. P. 2007. Following the law. NATURE, Vol 445, p. 228.

>  Prof. Ronaldo Reis Júnior
|  .''`. UNIMONTES/DBG/Lab. Ecologia Comportamental e Computacional
| : :'  : Campus Universitário Prof. Darcy Ribeiro, Vila Mauricéia
| `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil
|   `- Fone: (38) 3229-8192 | ronaldo.reis_at_unimontes.br
| http://www.ppgcb.unimontes.br/lecc | LinuxUser#: 205366

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 08 Apr 2011 - 10:47:48 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 Fri 08 Apr 2011 - 11:10:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive