Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

diyar (version 0.4.0)

listr: Grammatical lists.

Description

A convenience function to format atomic vectors as a written list.

Usage

listr(x, sep = ", ", conj = " and", lim = Inf)

Arguments

x

atomic vector.

sep

Separator.

conj

Final separator.

lim

Elements to include in the list. Other elements are abbreviated to " ...".

Value

character.

Examples

Run this code
# NOT RUN {
listr(1:5)
listr(1:5, sep = "; ")
listr(1:5, sep = "; ", conj = " and")
listr(1:5, sep = "; ", conj = " and", lim = 2)

# }

Run the code above in your browser using DataLab