canonical.decorated | R Documentation |
Enforces canonical attribute order for class 'decorated'. Set of default_keys will be augmented with all observed attribute names and will be expanded or reduced as necessary for each data item.
## S3 method for class 'decorated'
canonical(
x,
default_keys = getOption("yamlet_default_keys", list("label", "guide")),
...
)
x |
decorated |
default_keys |
attribute names in preferred order |
... |
ignored |
decorated
Other canonical:
canonical.yamlet()
,
canonical()
Other interface:
classified.data.frame()
,
decorate.character()
,
decorate.data.frame()
,
desolve.decorated()
,
ggplot.decorated()
,
io_csv.character()
,
io_csv.data.frame()
,
io_res.character()
,
io_res.decorated()
,
io_table.character()
,
io_table.data.frame()
,
io_yamlet.character()
,
io_yamlet.data.frame()
,
is_parseable.default()
,
mimic.default()
,
modify.default()
,
promote.list()
,
read_yamlet()
,
resolve.decorated()
,
selected.default()
,
write_yamlet()
# make some decorated data
library(magrittr)
x <- data.frame(x = 1, y = 1, z = factor('a'))
x %<>% decorate('
x: [ guide: mm, desc: this, label: foo ]
"y": [ guide: bar, desc: other ]
')
# retrieve decorations: label not first!
decorations(x)
# sort label first by default
decorations(canonical(x))
# equivalent invocation
canonical(decorations(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.