File: JSONtoDF.Rd

package info (click to toggle)
r-cran-d3network 0.5.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 228 kB
  • sloc: makefile: 2
file content (33 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{JSONtoDF}
\alias{JSONtoDF}
\title{Read a link-node structured JSON file into R as two data frames.}
\source{
Part of the idea for the command comes from mropa's comment on
StackExchange:
\url{http://stackoverflow.com/questions/4227223/r-list-to-data-frame}.
}
\usage{
JSONtoDF(jsonStr = NULL, file = NULL, array)
}
\arguments{
\item{jsonStr}{a JSON object to convert. Note if \code{jsonStr} is specified,
then \code{file} must be \code{NULL}.}

\item{file}{character string of the JSON file name. Note if \code{file} is
specified, then \code{jsonStr} must be \code{NULL}.}

\item{array}{character string specifying the name of the JSON array to
extract. (JSON arrays are delimited by square brackets).}
}
\description{
\code{JSONtoDF} reads a JSON data file into R and converts part of it to a
data frame.
}
\details{
\code{JSONtoDF} is intended to load JSON files into R and convert
them to data frames that can be used to create network graphs. The command
converts the files into R lists and then extracts the JSON array the user
would like to make into a data frame.
}