tcR (version 1.1)

check.distribution: Check for adequaty of distrubution.

Description

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

Usage

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

Arguments

.data
Numeric vector of values.
.do.norm
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 than do normalisation and laplace correction. If F than don't do normalisaton and laplace corre
.laplace
Value for laplace correction.
.na.val
Replace all NAs with this value.

Value

  • Numeric vector.