compareDist | R Documentation |
compare multiple distributions. All based on columns in a data.frame.
Creates several plots based on the integers present in plot
.
compareDist(
df,
plot = 1:4,
bw = "SJ",
col = catPal(ncol(df), alpha = 0.3),
main = paste("Distributions of", deparse(substitute(df))),
xlab = "Values",
ylab = "Density",
legpos1 = "topleft",
legpos2 = NULL,
horizontal = FALSE,
...
)
df |
Data.frame with (named) columns. |
plot |
Integers: which graphics to plot? |
bw |
Bandwidth passed to |
col |
Color (vector). DEFAULT: |
main |
Title. DEFAULT: "Distributions of [df name]" |
xlab , ylab |
Axis labels for plot 1. DEFAULT: xlab="Values", ylab="Density" |
legpos1 , legpos2 |
Legend position for plot 1. DEFAULT: "topleft", NULL |
horizontal |
Should boxplot and vioplot (plot 3 and 4) be horizontal? DEFAULT: FALSE |
... |
Further arguments passed to |
df, invisible
Berry Boessenkool, berry-b@gmx.de, Aug 2020
groupHist
fakedata <- data.frame(norm=rnorm(30), exp=rexp(30), unif=runif(30))
compareDist(fakedata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.