Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ensure_last_n_empty

Ensure there is one (and only one) blank line at the end of a vector


Description

Ensure there is one (and only one) blank line at the end of a vector

Usage

ensure_last_n_empty(x, n = 1)

Examples

styler:::ensure_last_n_empty("")
styler:::ensure_last_n_empty(letters)
styler:::ensure_last_n_empty(c(letters, "", "", ""))

styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.