list_out: List vector elements in a nice format

Description Usage Arguments Value

View source: R/utils.R

Description

Converts a vector into a comma-separated list for use in sentences (error messages, warnings, etc.).

Usage

1
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.


postpack documentation built on June 3, 2021, 1:07 a.m.