parse_df: Parse data.frame to json or list by row or column

Description Usage Arguments Details Examples

Description

Parse data.frame to json or list by row or column

Usage

1
parse_df(dat, how = "rows", tojson = TRUE, ...)

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 - if FALSE, to lists

...

Further args passed on to toJSON

Details

Parse data.frame to get either rows or columns, each as a list or json string

Examples

1
2
3
4
5
6
7
## 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)

## End(Not run)


Search within the sofa package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.