Combine strings, as separate lines of text.
concat_with_nl(s, ..., start_par = FALSE, extra_lines = 0, collapse = "")
A character string
Additional character strings
Put an extra newline between each pair of strings, so each string starts a new paragraph.
Number of extra newlines to append after each string.
Extra characters to insert between the strings.
A character string.
Take two or more lines of text. Make sure they each end with a newline and then concatenate them.
concat_with_nl("foo", "bar")
#> [1] "foo\nbar\n"
concat_with_nl("foo", "bar", start_par = TRUE)
#> [1] "foo\n\nbar\n"
concat_with_nl("foo", "bar", collapse = "...")
#> [1] "foo\n...bar\n"