Suppose I have a string
"1|2|3|4|5|6
7|8|9"
Note the ‘\n’ present after 6
scan(text="1|2|3|4|5|6
7|8|9", sep="|",what="")
would return you:
Read 9 items
[1] "1" "2" "3" "4" "5" "6 " "7" "8" "9"
how can I get 8 items where the 6th item should be 6 \n7 instead of two seperate items?
How about this: