Hi,
I have this simple file:
data.frame(stringsAsFactors=FALSE,
URN = c("A", "B", "C", "D", "E", "F", "G", "H"),
QUESTION = c("Timeliness", "Recommendation", "Timeliness", "Staff",
"Recommendation", "Recommendation", "Choice Dealer",
"Fixed Right First Time"),
VERBATIM = c("aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh"),
CONCEPTS = c("-[5|70|81]\t-[9|0|70]",
"+[23|427|99]\t-[32|0|103]\t-[32|294|21]\t-[32|962|92]\t-[35|0|103]\t-[35|294|21]\t-[35|669|156]\t-[38|555|114]\t-[5|1159|103]",
"-[10|0|216]\t-[32|0|216]\t-[32|216|215]\t-[48|431|84]\t-[5|431|84]", "-[38|0|63]\t-[38|176|38]\t-[5|95|81]",
"-[5|0|240]\t-[9|0|240]", "-[5|128|50]", NA, NA)
)
I have looked at some solutions such as this: Split text column into two parts or that: Split data: text to columns
but my challenge is slightly different:
All I need is splitting CONCEPTS into separate columns using following dividers:
|
[
]
- space
Basically I need +,- or a number
I'm sure the tack is easy but I have different length of each record...
Can you help?