powered by
This function returns a DISTRIBUTION with a new dimension created by row sum of the dimensions of the distribution.
DISTRIBUTION
add_total(p_distribution, p_totalname = "TOTAL")
a DISTRIBUTION
an object of class DISTRIBUTION
the name of the new dimension
John J. Aponte
Only works with multidimensional distributions.
d1 <- new_DIRICHLET(c(0.2,0.5,0.3)) d2 <- add_total(d1)
Run the code above in your browser using DataLab