I want to print the elements of a vector line by line in R as shown below
1
2
3
However, when I do paste(c(1,2,3), "\n")or paste(c(1,2,3),sep = "\n"), a new line will never be printed. The same applies to cat. I always get the following:
"1" "2" "3"
I would like to know to get around this problem.
source
share