tidyList: Generates a neat list of elements

Description Usage Arguments Value Examples

View source: R/tidyList.R

Description

This function takes as input one character vector and constructs a meaningful text. By default it results in a list with elements separated by commas and the last element separated by ", and".

Usage

1
tidyList(x, sep = ",", last = "and", dec = ".")

Arguments

x

Name of the object containing character vector.

sep

How to separate pieces of information displayed. Defaults to a commas followed by a space.

last

How to separate the last element. Defaults to "and".

Value

A string of text to be used in markdown documents.

Examples

1
2
3
x <- c("apples", "oranges", "grapes")
tidyList(x)
tidyList(c(2.3, 5.4, 3), dec=",")

eduardohet/resulteR documentation built on Aug. 9, 2021, 3:02 a.m.