View source: R/widget-display.R
| metric | R Documentation |
A key number with a label and an optional change (delta) shown as a green up or red down arrow. Useful in dashboards.
metric(
label,
value = NA,
delta = NULL,
format = NULL,
id = NULL,
classes = NULL,
style = NULL
)
label |
Label shown above the value. |
value |
The value (any R value; numbers are formatted with thousands separators). |
delta |
Optional change since the last value. |
format |
Optional |
id |
Optional identifier. |
classes |
Optional classes. |
style |
A |
A Metric widget with reactive value and delta, and method
update(value, delta).
render_widget(metric("Accuracy", 0.943, delta = 0.012), 20, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.