rule | R Documentation |
Compute the number of classes for a histogram, the number of nodes of a binning grid, etc.
rule(x, d = 1, rule = c("Rice", "Sturges", "scott", "FD"), ...)
rule.binning(x, ...)
## Default S3 method:
rule.binning(x, d = ncol(x), a = 2, b = d + 1, ...)
rule.svar(x, ...)
## Default S3 method:
rule.svar(x, d = ncol(x), a = 2, b = d + 1, ...)
## S3 method for class 'bin.den'
rule.svar(x, ...)
x |
data vector or object used to select a method. |
d |
(spatial) dimension. |
rule |
character; rule to be used. |
... |
further arguments passed to or from other methods. |
a |
scale values. |
b |
exponent values. |
The Rice Rule, m = \lceil 2 n^{1/3} \rceil,
is a simple alternative to Sturges's rule (nclass.Sturges
).
The rule values (vector or scalar).
rule.binning
returns a vector with the suggested number of bins
on each dimension.
rule.binning.default
returns rep(ceiling(a * nrow(x) ^ (1 / b)), d)
.
rule.svar
returns the suggested number of bins
for variogram estimation.
rule.svar.default
returns ceiling(a * (nrow(x)^2 / 4) ^ (1 / b))
.
hist
, nclass.Sturges
, nclass.scott
,
nclass.FD
,
binning
, np.den
, bin.den
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.