strsplit Function in R (3 Examples) | How to Split a Character String into Chunks | Specify Pattern

Published: 10 January 2022
on channel: Statistics Globe
3,491
48

How to split a character string into chunks in the R programming language. More details: https://statisticsglobe.com/strsplit-...
R code of this video:

my_string <- "aaa bbb ccc dxxexxfxxg" # Create example character string
my_string # Print character string

strsplit(my_string, split = " ") # Apply strsplit function

strsplit(my_string, split = "xx") # Specify splitting pattern

unlist(strsplit(my_string, split = "xx")) # Convert strsplit output to vector

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – Group for Discussions & Questions:   / statisticsglobe  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – Group for Discussions & Questions:   / 12555223  
Twitter:   / joachimschork  

Music by bensound.com


On this page of the site you can watch the video online strsplit Function in R (3 Examples) | How to Split a Character String into Chunks | Specify Pattern with a duration of hours minute second in good quality, which was uploaded by the user Statistics Globe 10 January 2022, share the link with friends and acquaintances, this video has already been watched 3,491 times on youtube and it was liked by 48 viewers. Enjoy your viewing!