6. Character vectors - Deep R Programming - gagolews deepr paste can be used to concatenate (join) the corresponding elements of two or more character vectors: paste ( c ( "a" , "b" , "c" ), c ( "1" , "2" , "3" )) # sep=" " by default ## [1] "a 1" "b 2" "c 3" paste ( c ( "a" , "b" , "c" ), c ( "1" , "2" , "3" ), sep = "" ) # see also paste0 ## [1] "a1" "b2" "c3"
R: Character Vectors character creates a character vector of the specified length The elements of the vector are all equal to "" as character attempts to coerce its argument to character type; like as vector it strips attributes including names