Relative Content

Tag Archive for rdataframesplit

adding 2 new columns after text split

df<-c(“Abc1038”) df<-strsplit(df, “(?=[A-Za-z])(?<=[0-9])|(?=[0-9])(?<=[A-Za-z])”, perl=TRUE) [[1]] [1] “Abc” “1038” From here, I would like to separate one column to 2; say one is named “text” and another is named “num”, may I know how should I go about it? r dataframe split