paste(..., sep = " ", collapse = NULL, recycle0 = FALSE) paste0(..., collapse = NULL, recycle0 = FALSE)
... |
the input vectors to paste. Can be numeric, logical,
complex, or character.
All arguments are coerced to mode character. Missing values (NAs) are allowed. If a name object is passed as an argument, it is coerced to a character vector of length one. |
sep= | the character string to be inserted between successive arguments. Can be "" for no space. The default is a single space. |
collapse= | NULL or a character string. If not NULL, then the vector of character strings produced by all the other arguments will be collapsed into a single character string, with the erstwhile output elements separeted by the value of collapse. |
recycle0 | a logical value. If FALSE zero-length ... arguments will be treated as vectors of empty character strings the length of the longest argument. If TRUE and any ... arguments have length zero, all arguments will be treated as having length zero. |
paste("No.",1:3) paste(1:3,4:6, sep="-") paste(1:10,collapse="") paste(1:3,4:6, sep="-", collapse="; ") paste("No.", integer(0), recycle0=TRUE) paste("No.", integer(0), collapse=", ", recycle0=TRUE)