I have a data.table that has three columns. The second column, I'd like to split based on a regex, so I'd end up with four columns. I keep getting bizarre responses when I do this, and I'd love some feedback. Below is a look at the data:
category label count
1 Navigation Product || Green 2
2 Navigation Survey || Green 5
3 Navigation Product || Red 10
4 Navigation Survey || Red 10
I'd want to split the label section at the ||
and create two new columns Type
and Color
.