Skip to contents

Determine if the object is a valid distribution

Usage

is_distr(x)

Arguments

x

an object, to be determined if it is a valid distribution

Value

TRUE if x is a valid distribution, FALSE otherwise

Author

Richèl J.C. Bilderbeek

Examples

check_empty_beautier_folder()

# TRUE
is_distr(create_beta_distr())
#> [1] TRUE
is_distr(create_exp_distr())
#> [1] TRUE
is_distr(create_gamma_distr())
#> [1] TRUE
is_distr(create_inv_gamma_distr())
#> [1] TRUE
is_distr(create_laplace_distr())
#> [1] TRUE
is_distr(create_log_normal_distr())
#> [1] TRUE
is_distr(create_normal_distr())
#> [1] TRUE
is_distr(create_one_div_x_distr())
#> [1] TRUE
is_distr(create_poisson_distr())
#> [1] TRUE
is_distr(create_uniform_distr())
#> [1] TRUE

# FALSE
is_distr(NA)
#> [1] FALSE
is_distr(NULL)
#> [1] FALSE
is_distr("nonsense")
#> [1] FALSE

check_empty_beautier_folder()