support: Return the support of a distribution

View source: R/methods.R

supportR Documentation

Return the support of a distribution

Description

Generic function for computing the support interval (minimum and maximum) for a given probability distribution object.

Usage

support(d, drop = TRUE, ...)

Arguments

d

An object. The package provides methods for distribution objects such as those from Normal() or Binomial() etc.

drop

logical. Should the result be simplified to a vector if possible?

...

Arguments passed to methods. Unevaluated arguments will generate a warning to catch mispellings or other possible errors.

Value

A vector (or matrix) with two elements (or columns) indicating the range (minimum and maximum) of the support.

Examples

X <- Normal()
support(X)
Y <- Uniform(-1, 1:3)
support(Y)

distributions3 documentation built on Sept. 7, 2022, 5:07 p.m.