stringify_vec: Stringify vector

Description Usage Arguments Value Examples

View source: R/fmt_utils.R

Description

Converts a vector (named or unnamed) into a single string representation.

Usage

1
stringify_vec(vec, item_sep = ", ", nm_sep = " = ", fmt = NULL)

Arguments

vec

vector: Vector to be converted into a character string.

item_sep

character: Character separator to use between vector elements when converting the vector into a string.

nm_sep

character: Character separator to use between names and values when converting the vector into a string (if names exist).

fmt

character: Format specification for the vector values or NULL to use defaults (which would be as returned by format).

Value

character: A single character string representation of the vector.

Examples

1
2
3
stringify_vec(c(1, 2, 3))

stringify_vec(c(one = 1, two = 2, three = 3))

toniprice/jute documentation built on May 21, 2017, 6:31 a.m.