I found a very strange behavior in strsplit()
. It's similar to this question, however I would love to know why it is returning an empty element in the first place. Does someone know?
unlist(strsplit("88F5T7F4T13F", "\\d+"))
[1] "" "F" "T" "F" "T" "F"
Since I use that string vor reproducing a long logical vector (88*FALSE 5*TRUE 7*FALSE 4*TRUE 13*FALSE) I have to trust it...
Answer unlist(strsplit("88F5T7F4T13F", "\\d+"))[-1]
works, but is it robust?