df2json (version 0.0.2)

matrix2json: Convert a matrix to JSON

Description

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

Usage

matrix2json(mat)

Arguments

mat
input matrix object

Examples

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

Run the code above in your browser using DataCamp Workspace