check.distribution: Check for adequaty of distrubution.

Description Usage Arguments Value


Check if the given .data is a distribution and normalise it if necessary with optional laplace correction.


check.distribution(.data, .do.norm = NA, .laplace = 1, .na.val = 0, = F, .warn.sum = T)



Numeric vector of values.


One of the three values - NA, T or F. If NA than check for distrubution (sum(.data) == 1) and normalise if needed with the given laplace correction value. if T then do normalisation and laplace correction. If F than don't do normalisaton and laplace correction.


Value for laplace correction.


Replace all NAs with this value.

if T then the function checks if in the resulted vector (after normalisation) are any zeros, and print a warning message if there are some.


if T then the function checks if the sum of resulted vector (after normalisation) is equal to one, and print a warning message if not.


Numeric vector.

Search within the tcR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.