as_yam.yamlet {yamlet} | R Documentation |
Coerce Yamlet to Yam
Description
Coerces class yamlet to yam, negotiating the default keys. For each member of x, names of sub-members will be dropped if all previous such have been dropped. I.e., attribute order is preserved, and 'guide' (by default) will not be made implicit unless 'label' has already been encountered (and made implicit). Default keys are attached as the 'keys' attribute of the result.
Usage
## S3 method for class 'yamlet'
as_yam(
x,
...,
default_keys = getOption("yamlet_default_keys", list("label", "guide"))
)
Arguments
x |
yamlet |
... |
ignored |
default_keys |
names that may be omitted in left subsets |
Value
yam
See Also
Other yam:
as.character.yam()
,
as_yam()
,
as_yam.character()
Examples
as_yam(as_yamlet(c('id: subject','amt: dose')))
as_yam(as_yamlet(c('amt: [ dose, mg ]')))
as_yam(as_yamlet(c('amt: [ guide: mg, label: dose ]')))
[Package yamlet version 1.2.5 Index]