Write a character vector with some "\n" to a text file, replacing them with line breaks in R?

Viewed 27

How to save a character vector containing some \n in a .txt file in R?

char = "Name\nAddress\nAge"

Should I use writeLines?

1 Answers
writeLines(char, "filename.txt")
Related