Learn R Programming

yamlet (version 0.8.5)

to_yamlet.character: Coerce Character to Yamlet Storage Format

Description

Coerces character to yamlet storage format. Named character is processed as a named list. NA_character_ is treated as the string 'NA'.

Usage

# S3 method for character
to_yamlet(x, block = FALSE, ...)

Arguments

x

character

block

whether to write block scalars

...

ignored

Value

length-one character

Details

If block is TRUE, an attempt will be made to represent character strings as literal block scalars if they contain newlines (experimental in yamlet >= 0.8).

See Also

Other to_yamlet: to_yamlet.NULL(), to_yamlet.default(), to_yamlet.list(), to_yamlet.yamlet(), to_yamlet()

Examples

Run this code
# NOT RUN {
to_yamlet('foo')
to_yamlet(c('a','b'))
to_yamlet(c(a = 'a',b = 'b'))
to_yamlet(c(no = 'n', yes = 'y'))
to_yamlet(NA)
# }

Run the code above in your browser using DataLab