Debian Codegraph @

man/vcat.Rd

raw
1 \name{vcat}
2 \alias{vcat}
3 \alias{ccat}
4 \title{Paste Utilities -- Concatenate Strings}
5 \description{
6 Con\bold{cat}enate vector elements or anything using
7 \code{\link{paste}(*, collapse = .)}.
8 These are simple short abbreviations I have been using in my own codes
9 in many places.
10 }
11 \usage{
12 vcat(vec, sep = " ")
13 ccat(...)
14 }
15 \arguments{
16 \item{vec, \dots}{any vector and other arguments to be pasted to together.}
17 \item{sep}{the separator to use, see the \emph{Details} section.}
18 }
19 \details{The functions are really just defined as \preformatted{
20 vcat := function(vec, sep = " ") paste(vec, collapse = sep)
21 ccat := function(...) paste0(..., collapse = "")
22 }}
23 \value{
24 a character string (of length 1) with the concatenated arguments.
25 }
26 \author{Martin Maechler, early 1990's.}
27 \seealso{\code{\link{paste}}, \code{\link{as.character}},
28 \code{\link{format}}. \code{\link{cat}()} is really for printing.
29 }
30 \examples{
31 ch <- "is"
32 ccat("This ", ch, " it: ", 100, "\%")
33 vv <- c(1,pi, 20.4)
34 vcat(vv)
35 vcat(vv, sep = ", ")
36 }
37 \keyword{print}
38 \keyword{utilities}