column splitting /filtering in R and
I have the below sample data frame:
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
Separating Columns into individual dataframes in R
I’ve found lots of information for doing something similar to what I want to do, but nothing that seems like it will do exactly what I want.