Learn R Programming

kStatistics (version 2.0)

mCoeff: Multiplicity in a multiset

Description

Return the instances of an element in a multiset.

Usage

mCoeff( v, L )

Arguments

v

vector to be searched in a list

L

list of two-dimensional vectors: in the first there is a vector and in the second its instances

Value

float

multiplicity of the researched item

Details

This function is useful in the construction of kStatistics. Compute how many times an element is in a multiset, that is its multiplicity.

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, umSet, countP, nStirling2, intPart, df

Examples

Run this code
# NOT RUN {
# Return [[1,1,1],1], [[1,2],3], [[3],1]
L1 <- mkmSet(c(3))   

# Return 3 that is the istance of [1,2] in L1
mCoeff( c(1,2), L1)  
 
# }

Run the code above in your browser using DataLab