# Create data for two independent groups, each with 50 observations
set.seed(1)
df1 <- data.frame(value = rnorm(100), group = rep(1:2, each = 50))
head(df1)
# Plots for visualization
bivarplot(df1)
# Convert to long data to wide data
df2 <- long2wide(df1)
head(df2)
# Plots for visualization
bivarplot(df2)
Run the code above in your browser using DataLab