
Convert a data frame to a list suitable for JSON serialization
Source:R/utils.R
rdesk_df_to_list.RdConverts a data frame into the two-part list structure that rdesk.js
expects: a rows component (list of per-row named lists) and a
cols component (character vector of column names). Empty or NULL
data frames return empty containers rather than an error.
Value
A list with two elements:
- rows
A list of named lists, one per row.
- cols
A character vector of column names.
See also
rdesk_plot_to_base64() for converting plot output.