json_vec_to_df: Turn a character vector of JSON dictionaries into a data...

Description Usage Arguments Examples

View source: R/utilities.R

Description

Sometimes (e.g. in a database column) one has a vector of individual JSON dictionaries with the same or similar keys. This is a simple utility to parse them all at once into a data frame. It's substantially more efficient than individually parsing them and then recombining them.

Usage

1

Arguments

j

Character vector containing JSON dictionaries

Examples

1
2
3
4
input <- c('{"col1": 3, "col2": 10}', '{"col1": 5}',
           NA, '{"col1": 50, "col2": 100}')

json_vec_to_df(input)

dgrtwo/drlib documentation built on Oct. 11, 2019, 6:42 a.m.