[R] "unvector" ?

Greg Snow Greg.Snow at intermountainmail.org
Mon Sep 11 20:57:02 CEST 2006


Try:

> paste(letters, collapse=' ')

Or

> do.call('paste',as.list(letters)) 


-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Eric Elguero
Sent: Monday, September 11, 2006 9:08 AM
To: r-help at stat.math.ethz.ch
Subject: [R] "unvector" ?

Hi ev'rybody,

is there a way to pass a vector to a function expecting separate
arguments?
more specifically, I have a character vector, say u and I want a single
string, but
>paste(u)
doesn't work, so I would like something like 
>paste(unvector(u)).

I am interested in a solution to the general problem too, as the only
one I found is maintaining two versions of the functions I write.

Eric Elguero
GEMI-UMR 2724 IRD-CNRS,
Equipe "Evolution des Systemes Symbiotiques"
911 avenue Agropolis, BP 64501,
34394 Montpellier cedex 5 FRANCE

______________________________________________
R-help at stat.math.ethz.ch 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.



More information about the R-help mailing list