Learn R Programming

mudata (version 0.1.1)

condense.tags: Condense multiple columns to a single JSON column

Description

Performs the opposite of expand.tags: collapses the data in tagcolumns to a single column (called tagcolumn) that contains a JSON representation of the data that was previously in the tag columns at that row.

Usage

condense.tags(x, ...)

# S3 method for data.frame condense.tags(x, tagcolumns, tagcolumn = "tags", ...)

# S3 method for mudata condense.tags(x, ...)

Arguments

x

a data frame with tag columns

...

passed to/from methods

tagcolumns

column names to be condensed to JSON

tagcolumn

the column in which to store JSON

Value

A modified data.frame

Examples

Run this code
# NOT RUN {
data(pocmaj)
condense.tags(pocmaj, tagcolumns = c("Ca", "Ti", "V"))

# }

Run the code above in your browser using DataLab