paste                  package:base                  R Documentation

_C_o_n_c_a_t_e_n_a_t_e _S_t_r_i_n_g_s

_D_e_s_c_r_i_p_t_i_o_n:

     Concatenate vectors after converting to character.

_U_s_a_g_e:

     paste(..., sep = " ", collapse = NULL)

_A_r_g_u_m_e_n_t_s:

     ...: one or more R objects, to be coerced to character vectors.

     sep: a character string to separate the terms.

collapse: an optional character string to separate the results.

_D_e_t_a_i_l_s:

     'paste' converts its arguments to character strings, and
     concatenates them (separating them by the string given by 'sep').
     If the arguments are vectors, they are concatenated term-by-term
     to give a character vector result.

     If a value is specified for 'collapse', the values in the result
     are then concatenated into a single string, with the elements
     being separated by the value of 'collapse'.

_V_a_l_u_e:

     A character vector of the concatenated values.  This will be of
     length zero if all the objects are, unless 'collapse' is non-NULL,
     in which case it is a single empty string.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     String manipulation with 'as.character', 'substr', 'nchar',
     'strsplit'; further, 'cat' which concatenates and writes to a
     file, and 'sprintf' for C like string construction.

_E_x_a_m_p_l_e_s:

     paste(1:12) # same as as.character(1:12)
     paste("A", 1:6, sep = "")
     paste("Today is", date())

