Learn R Programming

plume (version 0.3.0)

enumerate: Enumerate vector elements

Description

Wrapper around glue_collapse() using sep = ", " and last = " and " as default arguments.

Usage

enumerate(x, sep = ", ", last = " and ")

Value

A character string with the same class as x.

Arguments

x

A character vector.

sep

Separator used to separate the terms.

last

Separator used to separate the last two items if x has at least 2 items.

Examples

Run this code
aut <- Plume$new(encyclopedists)
enumerate(aut$get_author_list())

Run the code above in your browser using DataLab