So I have a text that I am trying to extract from. Here is my text:
Charge: Larceny; Charge: Stealing a motor vehicle;
And I am trying to create this
Charge1 Charge2 Charge3
Larceny Stealing a motor vehicle NA
Any ideas? Right now my code looks like this:
data$charge <- str_extract_all(data, "(?=Charge:)(\\D){4,100}")
But it only created one column. Please help!