list_ncol_in_aux_column: List count of sub-columns per row in a column that is a JSON...

Description Usage Arguments Examples

View source: R/json-helper.R

Description

List count of sub-columns per row in a column that is a JSON formatted string

Usage

1
list_ncol_in_aux_column(df1, aux_info_colname)

Arguments

df1

A dataframe

aux_info_colname

Column name of JSON formatted string

Examples

1
2
3
4
5
df1 = data.frame(name = c("Alice", "Bob"),
                 details__JSON = c('[{  "boolean": true,   "null": null,   "number": 123,   "string":  "Hello World" }]',
                                   '[{  "boolean": false,                  "number": 456,   "differentString":  "Hi World" }]'), 
                 stringsAsFactors = FALSE)
list_ncol_in_aux_column(df1, 'details__JSON')

Paradigm4/revealgenomics documentation built on April 7, 2020, 2:01 a.m.