Let's say I have the following vector:
output <- c("foo\n", "bar\n")
If I want to display this via cat, I get a weird indentation:
> cat(output)
foo
bar
Why is there a space before "bar"? I can get around it with paste:
> cat(paste(output, collapse = ""))
foo
bar
but I don't understand why cat is behaving in this fashion in the first place? Is this a bug, or am I missing something about how cat behaves?