add_total: Adds a total dimension

Description Usage Arguments Details Value Author(s) Examples

View source: R/convolution_comb.R

Description

This function returns a DISTRIBUTION with a new dimension created by row sum of the dimensions of the distribution.

Usage

1
add_total(p_distribution, p_totalname = "TOTAL")

Arguments

p_distribution

an object of class DISTRIBUTION

p_totalname

the name of the new dimension

Details

Only works with multidimensional distributions.

Value

a DISTRIBUTION

Author(s)

John J. Aponte

Examples

1
2
d1 <- new_DIRICHLET(c(0.2,0.5,0.3))
d2 <- add_total(d1)

convdistr documentation built on April 20, 2021, 9:06 a.m.