Learn R Programming

toolbox (version 0.1.1)

namesToString: Pastes the names of a object into a string, optionally quoting the names.

Description

Pastes the names of a object into a string, optionally quoting the names.

Usage

namesToString(x, collapse = ",", quote = FALSE)

Value

A string.

Arguments

x

A named object (vector, list, data.frame)

collapse

A string to separate the collapsed names.

quote

TRUE/FALSE, if TRUE, adds quotes to the names.

Examples

Run this code
namesToString(c("test" = 1, "this" = 2))

Run the code above in your browser using DataLab