I have had an issue regarding splitting the string having |
in R. How can I separate abc
and def
in this case? Thank you all for your help.
> str_split("abc|def", "|")
[[1]]
[1] "" "a" "b" "c" "|" "d" "e" "f" ""
> str_split("abc|def", ".|.")
[[1]]
[1] "" "" "" "" "" "" "" ""