"Eric Elguero" <[EMAIL PROTECTED]> writes:

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

In general, something like do.call("foo", as.list(args)), for paste()
in particulare, notice e.g. collapse=" ".


-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45) 35327907

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

Reply via email to