df2json v0.0.2

0

Monthly downloads

0th

Percentile

Convert a dataframe to JSON

It handles numerics, characters, factors, and logicals.

Readme

df2json

df2json is an R package to convert a dataframe to a JSON object.

It handles numerics, characters, factors, and logicals.

Install

install.packages("devtools")
library(devtools)
install_github("df2json","nachocab")

Usage

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)

The result is

[{"name":"a","x":null,"y":10,"show":true},
 {"name":"b","x":2,"y":20,"show":false},
 {"name":"c","x":3,"y":null,"show":true}]

Functions in df2json

Name Description
matrix2json Convert a matrix to JSON
json2df Convert a JSON string into a data frame
df2json df2json
No Results!

Last month downloads

Details

License GPL-3
URL http://github.com/nachocab/df2json
Collate 'df2json-package.r' 'df2json.R'
Packaged 2013-04-05 11:27:40 UTC; nacho
NeedsCompilation no
Repository CRAN
Date/Publication 2013-04-08 16:14:14

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/df2json)](http://www.rdocumentation.org/packages/df2json)