matrix2json: Convert a matrix to JSON

Description Usage Arguments Examples

View source: R/df2json.R

Description

It returns a string of nested arrays. One array per row.

Usage

1

Arguments

mat

input matrix object

Examples

1
2
3
library(df2json)
df <- matrix(1:9, byrow = TRUE, nrow=3)
matrix2json(df)

Example output

Loading required package: rjson
[1] "[[1,2,3],[4,5,6],[7,8,9]]"

df2json documentation built on May 2, 2019, 1:03 p.m.