toJSONArray: Converts an R object to a JSON array of objects

Description Usage Author(s) Examples

View source: R/toJSON.R

Description

toJSON converts an R data frame to an object with key value pairs for each column. However, a lot of javascript charting libraries need an array of objects, one for each row of the data frame. This utility function does that.

Usage

1
  toJSONArray(obj, json = TRUE)

Author(s)

Ramnath Vaidyanathan

Examples

1
2
3
4
## Not run: 
toJSONArray(head(iris))

## End(Not run)

ramnathv/testapp1 documentation built on May 26, 2019, 10:55 p.m.