| checkEmptyBins | R Documentation |
Checks for empty bins, i.e. bins with zero weight (two consecutive equal values
of the cdf). Each empty bin gets a weight of 1e-8 and the cdf is
renormalised. Since version 1.0.9 empty bins are fixed when a
distributionH object is created (see distributionH), so
this method is useful for objects created with previous versions of the
package or modified by assigning their slots directly. The MatH method
applies the check to all the cells of the matrix.
checkEmptyBins(object)
object |
A |
An object of the same class of object, without empty bins.
## an empty bin in an object modified by slot assignment
mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.5, 0.6, 1))
mydist@p <- c(0, 0.5, 0.5, 1)
diff(checkEmptyBins(mydist)@p)
## all the distributions of a MatH
newMat <- checkEmptyBins(China_Seas[1:5, 1:3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.