Shows names and values in two aligned columns, e.g. a summary of a data set.
Usage
key_value(data = list(), id = NULL, classes = NULL, style = NULL)Arguments
- data
A named list or vector.
- id
Optional identifier.
- classes
Optional classes.
- style
A
style().
Choosing a key/value widget
key_value(): a few known values shown in full, such as a summary panel. Not focusable, does not scroll; values are not wrapped.property_grid(): an inspector for many or arbitrary named values. Focusable and scrollable, wraps long values, formats vectors and lists compactly and accepts aformatfunction.record_view():property_grid()for exactly one record, such as the selected row of adata_table(); accepts a one-row data frame.
Examples
render_widget(key_value(list(Rows = 32, Columns = 11, Source = "mtcars")), 20, 3)
#> <ScreenBuffer 20x3>
#> +--------------------+
#> |Rows 32 |
#> |Columns 11 |
#> |Source mtcars |
#> +--------------------+