stream_in {ndjson} | R Documentation |
Stream in & flatten an ndjson file into a data.table
Description
Given a file of streaming JSON (ndjson) this function reads in the records
and creates a flat data.table
/ tbl
from it.
Usage
stream_in(path, cls = c("dt", "tbl"))
Arguments
path |
path to file (supports " |
cls |
the package uses |
Value
data.table
or tbl
References
Examples
f <- system.file("extdata", "test.json", package="ndjson")
nrow(stream_in(f))
gzf <- system.file("extdata", "testgz.json.gz", package="ndjson")
nrow(stream_in(gzf))
[Package ndjson version 0.9.0 Index]