long2wide: Convert data from long to wide format

View source: R/long2wide.R

long2wideR Documentation

Convert data from long to wide format

Description

Convert data from long to wide format

Usage

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

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

sep

separator for factor levels

Value

a tbl in wide format

Examples

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


faux documentation built on April 20, 2023, 9:13 a.m.