compareDistributions {Orcs} | R Documentation |
Compare Two Density Distributions Side by Side
Description
This function will produce a plot of two density functions displayed side by side.
Usage
compareDistributions(
left,
right,
add.spread = TRUE,
print.stats = TRUE,
xlim = NULL,
ylim = NULL,
clrs = c("purple", "lightblue"),
xlab = "density",
ylab = "value",
...
)
Arguments
left |
|
right |
|
add.spread |
|
print.stats |
|
xlim , ylim |
|
clrs |
A |
xlab , ylab |
|
... |
Additional arguments passed to |
Value
A trellis
object.
Author(s)
Tim Appelhans
Examples
compareDistributions(rnorm(1000, 2, 3), rnorm(1000, -5, 1))
compareDistributions(rnorm(1000, 2, 3), rnorm(1000, -5, 1),
add.spread = FALSE)
compareDistributions(rnorm(1000, 2, 3), rnorm(1000, -5, 1),
add.spread = TRUE, clrs = c("red", "brown"))
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = FALSE, add.spread = FALSE)
## pass additional parameters to stats::density()
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = FALSE, add.spread = FALSE, bw = 5)
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = FALSE, add.spread = FALSE, bw = 8,
kernel = "rectangular")
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = FALSE, add.spread = TRUE, bw = 8,
n = 3)
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = TRUE, add.spread = TRUE, bw = 0.1)
compareDistributions(rnorm(1000, 2, 5), rnorm(1000, -5, 4),
print.stats = TRUE, add.spread = TRUE, bw = 0.5)
[Package Orcs version 1.2.3 Index]