How to concatenate a vector of character strings in the R programming language. More details: [ Ссылка ]
R code of this video:
x <- c("hello", "this", "should", "be", "concatenated") # Create example vector
x # Print example vector to console
paste(x, collapse = " ") # Collapse example character string
paste(x, collapse = "_") # Collapse with different separator
paste(x, collapse = "") # Collapse without separator
install.packages("stringr") # Install stringr package
library("stringr") # Load stringr package
str_c(x, collapse = " ") # Collapse string with str_c
Follow me on Social Media:
Facebook – Statistics Globe Page: [ Ссылка ]
Facebook – Group for Discussions & Questions: [ Ссылка ]
LinkedIn – Statistics Globe Page: [ Ссылка ]
LinkedIn – Group for Discussions & Questions: [ Ссылка ]
Twitter: [ Ссылка ]
Music by bensound.com
Ещё видео!