cc: Concatenation with Commas

Description Usage Arguments See Also Examples

Description

Concatenates object values into a string with each value separated by a comma and possibly the last value separated by a conjunction.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Default S3 method:
cc(object, conjunction = NULL, bracket = "",
  ellipsis = 10, oxford = FALSE, ...)

## S3 method for class 'character'
cc(object, conjunction = NULL, bracket = "'",
  ellipsis = 10, oxford = FALSE, ...)

## S3 method for class 'factor'
cc(object, conjunction = NULL, bracket = "'",
  ellipsis = 10, oxford = FALSE, ...)

## S3 method for class 'data.frame'
cc(object, conjunction = NULL, ellipsis = 10,
  oxford = FALSE, ...)

Arguments

object

The object with values to concatenate.

conjunction

A string of the conjunction to separate the last value by or NULL.

bracket

A string to bracket the values by.

ellipsis

A count of the total number of values required to use an ellipsis.

oxford

A flag indicating whether to use the Oxford comma (if conjunction).

...

Unused

See Also

co

Examples

1
2
3
4
5
cc(c(1,1,1:2))
cc(100:1)
cc(1:100, "and")
cc(100:1, "or", bracket = "|", ellipsis = 5, oxford = TRUE)
cc(mtcars)

err documentation built on May 2, 2019, 3:07 p.m.

Related to cc in err...