WH.vec.sum | R Documentation |
Compute a histogram that is the weighted sum of the set of histograms contained
in a MatH
object, i.e. a matrix of histograms, consistent with
a set of distributions equipped with a L2 wasserstein metric.
WH.vec.sum(object, ...)
## S4 method for signature 'MatH'
WH.vec.sum(object, w = numeric(0))
object |
a |
... |
optional arguments |
w |
it is possible to add a vector of weights (positive numbers) having the same size of the |
a distributionH
object, i.e. a histogram
hsum <- WH.vec.sum(BLOOD)
# generate a set of random weights
RN <- runif(get.MatH.nrows(BLOOD) * get.MatH.ncols(BLOOD))
hsum <- WH.vec.sum(BLOOD, w = RN)
### SUM of distributions ----
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.