chistogram-methods | R Documentation |
Returns an object of class Histogram
. The method can be called recursively.
This way more than one dataset can be binned into one histogram. The method is time consuming.
## S4 method for signature 'Histogram'
chistogram(x = NULL, Dataset = data.frame(),
K = numeric(), ymin = numeric(), ymax = numeric(), ...)
## ... and for other signatures
x |
an object of class |
Dataset |
a data frame of size |
K |
an integer or a vector of length |
ymin |
a vector of length |
ymax |
a vector of length |
... |
currently not used. |
signature(x = "Histogram")
an object of class Histogram
.
Marko Nagode
# Create three datasets.
set.seed(1)
n <- 15
Dataset1 <- as.data.frame(cbind(rnorm(n, 157, 8), rnorm(n, 71, 10)))
Dataset2 <- as.data.frame(cbind(rnorm(n, 244, 14), rnorm(n, 61, 29)))
Dataset3 <- as.data.frame(cbind(rnorm(n, 198, 8), rnorm(n, 252, 13)))
apply(Dataset1, 2, range)
apply(Dataset2, 2, range)
apply(Dataset3, 2, range)
# Bin the first dataset.
hist <- chistogram(Dataset = Dataset1, K = c(4, 5), ymin = c(100.0, 0.0), ymax = c(300.0, 300.0))
# Bin the second dataset.
hist <- chistogram(x = hist, Dataset = Dataset2)
# Bin the third dataset.
hist <- chistogram(x = hist, Dataset = Dataset3)
hist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.