I have a character vector which includes
regex special characters such as
I want to save this vector to a txt-file which shows the
The code below creates a txt file, but when opening the file e.g. in notepad, the
\n are translated into linebreaks. I don't want to see the linebreaks, I want to see
library(tidyverse) my_text <- "hello\n, nice to meet you.\n\n. how are you?" my_text readr::write_file(my_text, "my_text.txt")
hello , nice to meet you. . how are you?
"hello\n, nice to meet you.\n\n. how are you?"