df2json (version 0.0.2)

df2json: df2json

Description

df2json

It returns a string that contains an array of objects. There are as many JS objects as there are rows in the data frame. The column names are used as the keys of each object. The objects are separated by newlines.

Usage

df2json(df)

Arguments

df
input dataframe object

Examples

Run this code
library(df2json)
df <- data.frame(name=c("a", "b", "c"), x=c(NA, 2 ,3), y=c(10, 20, -Inf), show=c(TRUE, FALSE, TRUE))
df2json(df)

Run the code above in your browser using DataLab