c                    package:base                    R Documentation

_C_o_m_b_i_n_e _V_a_l_u_e_s _i_n_t_o _a _V_e_c_t_o_r _o_r _L_i_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     This is a generic function which combines its arguments.

     The default method combines its arguments to form a vector. All
     arguments are coerced to a common type which is the type of the
     returned value.

_U_s_a_g_e:

     c(..., recursive=FALSE)

_A_r_g_u_m_e_n_t_s:

     ...: objects to be concatenated.

recursive: logical.  If 'recursive = TRUE', the function recursively
          descends through lists (and pairlists) combining all their
          elements into a vector.

_D_e_t_a_i_l_s:

     The output type is determined from the highest type of the
     components in the hierarchy NULL < raw < logical < integer < real
     < complex < character < list < expression.  Pairlists are treated
     as lists, but non-vector components (such names and calls) are
     treated as one-element lists which cannot be unlisted even if
     'recursive = TRUE'.

_V_a_l_u_e:

     'NULL' or an expression or a vector of an appropriate mode.

_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:

     'unlist' and 'as.vector' to produce attribute-free vectors.

_E_x_a_m_p_l_e_s:

     c(1,7:9)
     c(1:5, 10.5, "next")

     ## append to a list:
     ll <- list(A = 1, c="C")
     ## do *not* use
     c(ll, d = 1:3) # which is == c(ll, as.list(c(d=1:3))
     ## but rather
     c(ll, d = list(1:3))# c() combining two lists

     c(list(A=c(B=1)), recursive=TRUE)

     c(options(), recursive=TRUE)
     c(list(A=c(B=1,C=2), B=c(E=7)), recursive=TRUE)

