Parse data.frame to json or list by row or column
Arguments
- dat
(data.frame) A data.frame, matrix, or tbl_df
- how
(character) One of rows (default) or columns. If rows, each row becomes a separate document; if columns, each column becomes a separate document.
- tojson
(logical) If
TRUE
(default) convert to json - ifFALSE
, to lists- ...
Further args passed on to
jsonlite::toJSON()