Skip to contents

The get_entity function creates standard entities that will be easier to transform json.

Usage

get_entity(x)

Arguments

x

data frame. A "long" form data frame with the fields Group, entity_id, Value, and variable.

Value

data frame in "wide" form

Details

Pivots data from long to wide.

Examples


df <- data.frame(Group = 1, entity_id = 1, Value = 1:3, Variable = letters[1:3])

get_entity(df)
#> # A tibble: 1 × 3
#>       a     b     c
#>   <int> <int> <int>
#> 1     1     2     3