[R] 2 simple doubts
David Brahm
brahm at alum.mit.edu
Thu Jul 11 15:20:51 CEST 2002
Frederico Zanqueta Poleto <fred at poleto.com> wrote:
> 1) I couldn't discover what is the command for a concatenation of 2
> variable strings.
Assuming you mean string concatenation, not vector concatenation... I find
this little utility function extremely convenient:
R> "%&%" <- function(a, b) paste(a, b, sep="")
R> "x" %&% "yz"
[1] "xyz"
R> c("a","A") %&% c("b","B") %&% c("c","C")
[1] "abc" "ABC"
--
-- David Brahm (brahm at alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list