expand.tags: Expand JSON to multiple columns

Description Usage Arguments Value Examples

View source: R/tags.R

Description

Expands a character vector of JSON values or a data.frame with a column tagcolumn to a data.frame with columns for each key in the vector of JSON objects. If x is a mudata object, the operation will be performed on the entire object.

Usage

1
2
3
4
5
6
7
expand.tags(x, ...)

## S3 method for class 'data.frame'
expand.tags(x, tagcolumn = "tags", lazy = FALSE, ...)

## S3 method for class 'mudata'
expand.tags(x, ...)

Arguments

x

a vector of JSON values or a data.frame with a 'tags' column

...

Passed to/from methods

tagcolumn

the column containing json

lazy

Don't preform expantion if tagcolumn exists in x

Value

A data.frame with columns added

Examples

1
2
3
data(pocmaj)
condensed <- condense.tags(pocmaj, tagcolumns = c("Ca", "Ti", "V"))
expand.tags(condensed)

mudata documentation built on Nov. 17, 2017, 7:30 a.m.