validate_Density: Validator for the S3 class 'Density'

Description Usage Arguments Details Special Attention See Also

View source: R/density.R

Description

This function serves as a validator for the S3 class Density. See 'Details' for further information and potential flaws.

Usage

1

Arguments

x

an R object to validate as object of S3 class Density.

Details

The validator validate_Density can be used to verify objects as formally correct S3 objects of class Density. In particular the formal structure is ensured and validate_IntegrableFunction is called internally. Additionally this function tries to (see 'Special Attention') validate the additional conditions of valid density functions (as specified in the first 'Details'-paragraph of Density).

Special Attention

Like all numerical routines, validate_Density can evaluate the represented function on a finite set of points only. If the represented function returns valid results over nearly all its range, it is possible that this function misses unexpected/wrong return values. Thus, using Density or validate_Density to construct and validate objects representing integrable functions is not sufficient to ensure the properties [1-5] listed in the first 'Details'-paragraph of Density, but serves more as a sanity-check.

See Also

Density for more information about density functions and the S3 class Density, IntegrableFunction for more information about the superclass IntegrableFunction.


hericks/KDE documentation built on Aug. 22, 2020, 12:04 a.m.