Splitting a text in one column into many columns for each row [duplicate]
问题 This question already has answers here : Splitting a dataframe string column into multiple different columns [duplicate] (4 answers) Closed 10 months ago . I have the following dataset: Class Range Value A 6 - 8 19 B 1 - 3 14 C 5 - 16 10 D 4 - 7 5 I want to split the range for each class into two columns. To do that, I used the function str_split_fixed as the following: merge(data, str_split_fixed(data[, 2], " - ", 2)) and I even tried: merge(data, str_split_fixed(data$Range, " - ", 2)) But