View source: R/squish_newlines.R
squish_newlines | R Documentation |
Deduplicate and remove trailing line breaks
squish_newlines(sepstring)
sepstring |
A character vector with new line control characters. |
Useful for tables with merged cells, often imported from Word or PDF files. Can be applied across multiple columns before separating into rows.
A vector without trailing or multiple consecutive new line sequences.
vecWithNewlines <- c("dog\n\ncat\n\n\npig\n")
squish_newlines(vecWithNewlines)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.