map_to_char: format a map.

Description Usage Arguments Value See Also Examples

View source: R/map_to_char.R

Description

format a map.

Usage

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

Arguments

mp

named vector or list

...

not used, foce later arguments to bind by name.

sep

separator suffix, what to put after commas

assignment

assignment string

quote_fn

string quoting function

Value

character formatted representation

See Also

dput, capture.output

Examples

1
2
3
4
cat(map_to_char(c('a' = 'b', 'c' = 'd')))
cat(map_to_char(c('a' = 'b', 'd', 'e' = 'f')))
cat(map_to_char(c('a' = 'b', 'd' = NA, 'e' = 'f')))
cat(map_to_char(c(1, NA, 2)))

WinVector/wrapr documentation built on Nov. 21, 2020, 8:31 p.m.