In a variable I try to replace the "\n" (end-line) with the characters "" and "n". All this to get a variable where the end-line is replaced by the text "\n" literally.
I tried:
MyText <- gsub("\n", " \\n ", "Line1\nLine2")
But somehow I end up with: "Line1nLine2" As soon I try to replace the end-line I'm not able to get the character "" in my variable.
Tried with str_replace_all, it's the same !
Has anybody an idea ?
Cheers, E