bivarplot | R Documentation |
Generates various plots to visualize and compare the distribution and characteristics of two variables.
bivarplot(ds)
ds |
A data frame or matrix containing the input data. The first column should be the variable of interest, and the second column should be the grouping variable, if data is in long format. |
This function generates a series of plots to compare two variables, including density plots, ECDF plots, boxplots, violin plots, QQ plots, symmetry plots, and empirical shift plots. If data is in long format, the function uses the second column of ds
for the group label.
Generates a series of plots to the current graphical device.
Zeynel Cebeci, A. Firat Ozdemir, Engin Yildiztepe
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.