datadr (version 0.8.4)

flatten: "Flatten" a ddf Subset

Description

Add split variables and BSVs (if any) as columns to a subset of a ddf.

Usage

flatten(x)

Arguments

x
a value of a key-value pair

See Also

getSplitVars, getBsvs

Examples

Run this code
d <- divide(iris, by = "Species")
# the column "Species" is no longer explicitly in the data
d[[1]]$value
# but it is preserved and can be added back in with flatten()
flatten(d[[1]]$value)

Run the code above in your browser using DataCamp Workspace