mCoeff {kStatistics} | R Documentation |
Extraction of a number from a list
Description
Given a list containing vectors paired with numbers, the function returns the number paired with the vector matching the one passed in input.
Usage
mCoeff( v=NULL,L=NULL )
Arguments
v |
vector to be searched in the list |
L |
two-dimensional list: in the first there is a vector and in the second a number |
Details
The input variable L
of the mCoeff
function is a list
containing vectors and numbers. The input variable v
of the mCoeff
function is one of vectors contained in the list. The function searches the vector
v
in the list and returns the number which is paired with v
in the list.
This function is useful in the construction of k-statistics but also to manage monomials
and their coefficients.
Value
float |
the number paired with the input vector |
Note
Called by the nPS
, nKM
and nPM
functions
in the kStatistics
package.
Author(s)
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
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 https://arxiv.org/pdf/math/0607623.pdf)
See Also
mkmSet
,
countP
,
nStirling2
,
intPart
,
ff
Examples
# Run mkmSet(c(3)) to get the list L1 = [[1,1,1],1], [[1,2],3], [[3],1]
L1 <- mkmSet(c(3))
# Return the number 3, which is the number paired with [1,2] in L1
mCoeff( c(1,2), L1)