list_out {postpack} | R Documentation |
List vector elements in a nice format
Description
Converts a vector into a comma-separated list for use in sentences (error messages, warnings, etc.).
Usage
list_out(x, final = NULL, per_line = 1e+06, wrap = NULL, indent = NULL)
Arguments
x |
A vector, will be coerced to a character. |
final |
Word that will separate the final element in the list from others. See the examples. |
per_line |
Number of elements printed per line. See the examples. |
wrap |
Optional character to wrap around each element, e.g., quotation marks. |
indent |
Optional string to place in front of the first element on each line. See the examples. |
Value
A character vector with length == 1; ready to be passed to
base::stop()
, base::warning()
, or base::cat()
, to provide a useful message.
[Package postpack version 0.5.4 Index]