powered by
Parse data.frame to json or list by row or column
parse_df(dat, how = "rows", tojson = TRUE, ...)
(data.frame) A data.frame, matrix, or tbl_df
(character) One of rows (default) or columns. If rows, each row becomes a separate document; if columns, each column becomes a separate document.
(logical) If TRUE (default) convert to json - if FALSE, to lists
TRUE
FALSE
Further args passed on to jsonlite::toJSON()
jsonlite::toJSON()
Parse data.frame to get either rows or columns, each as a list or json string
# NOT RUN { parse_df(mtcars, how="rows") parse_df(mtcars, how="columns") parse_df(mtcars, how="rows", tojson=FALSE) parse_df(mtcars, how="columns", tojson=FALSE) # }
Run the code above in your browser using DataLab