Learn R Programming

wrapr (version 1.4.0)

map_to_char: format a map.

Description

format a map.

Usage

map_to_char(mp, sep = " ", assignment = "=", quote_fn = base::shQuote)

Arguments

mp

named vector or list

sep

separator suffix, what to put after commas

assignment

assignment string

quote_fn

string quoting function

Value

character formatted representation

Examples

Run this code
# NOT RUN {
cat(map_to_char(c('a' = 'b', 'c' = 'd')))
cat(map_to_char(c('a' = 'b', 'd', 'e' = 'f')))

# }

Run the code above in your browser using DataLab