Remove all lines that are only whitespace

remove_empty_lines(lines, trim = FALSE)

Arguments

lines

character vector with text

trim

FALSE if indentation must be preserved, TRUE will remove all surrounding whitespace

Value

the lines with text

Author

Richèl J.C. Bilderbeek