long2wide: Convert data from long to wide format

Description Usage Arguments Value Examples

View source: R/long2wide.R

Description

Convert data from long to wide format

Usage

1
long2wide(data, within = c(), between = c(), dv = "y", id = "id")

Arguments

data

the tbl in long format

within

the names of the within column(s)

between

the names of between column(s) (optional)

dv

the name of the DV (value) column

id

the names of the column(s) for grouping observations

Value

a tbl in wide format

Examples

1
2
df_long <- sim_design(2, 2, long = TRUE)
long2wide(df_long, "A", "B")

faux documentation built on Sept. 14, 2021, 1:08 a.m.