Package stringr: String Split
September 27, 2016
Sometimes it is necessary to take apart a string. The str_split() function in the stringr package allows you to do that.
Let’s use the example dataset Loblolly in r
Here in the first column we have the height of the trees in ft. Lets say that we want to convert this to two columns one for feet and another for inches. (Note: There are quite a few ways to do this, but here we use this method to show off the str_split() function.)