Learn R Programming

kStatistics (version 2.0)

umSet: Disjoint union of multisets

Description

The function returns the disjoint union of two or more multisets, by adding the multiplicity of equal elements.

Usage

umSet( pM )

Arguments

pM

list of two or more multisets

Value

list

the multiset union

Details

Given the two multisets [a,a,a,b] and [a,b,b,c], the function returns [a,a,a,a,b,b,b,c]. Given the subdivisions [[a,b],[a]] with multiplicity 3 and [[a,b],[a]] with multiplicity 5, the function returns [[a,b],[a]] with multiplicity 8. See also examples.

References

E. Di Nardo, G. Guarino, D. Senato (2008) An unifying framework for k-statistics, polykays and their generalizations. Bernoulli. 14(2), 440-468. (download from http://arxiv.org/pdf/math/0607623.pdf)

See Also

mkmSet, mCoeff, countP, nStirling2, intPart, df

Examples

Run this code
# NOT RUN {
# Return the list( list( c(1,1), c(1,0) ), c(8) )
M1 <- list( list( c(1,1), c(1,0) ), c(3) ) 
M2 <- list( list( c(1,1), c(1,0) ), c(5) ) 
umSet(list(M1,M2)) 

# }

Run the code above in your browser using DataLab