powered by
Convert data from long to wide format
long2wide( data, within = c(), between = c(), dv = "y", id = "id", sep = faux_options("sep") )
a tbl in wide format
the tbl in long format
the names of the within column(s)
the names of between column(s) (optional)
the name of the DV (value) column
the names of the column(s) for grouping observations
separator for factor levels
df_long <- sim_design(2, 2, long = TRUE) long2wide(df_long, "A", "B")
Run the code above in your browser using DataLab