compareDist {berryFunctions} | R Documentation |
compare distributions
Description
compare multiple distributions. All based on columns in a data.frame.
Creates several plots based on the integers present in plot
.
Usage
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,
...
)
Arguments
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 |
Value
df, invisible
Author(s)
Berry Boessenkool, berry-b@gmx.de, Aug 2020
See Also
Examples
fakedata <- data.frame(norm=rnorm(30), exp=rexp(30), unif=runif(30))
compareDist(fakedata)