powered by
This function initialises the permutation object. It must be called before nextPerm can be called
nextPerm
initMC(x)
a object of class mc which is a list containing elements
mc
- the mode of the original data in x, "integer", "double", or mode(x)
x
mode(x)
- either the multiset being permuted if mode is "integer" or a set of integers corresponding to the elements of the multiset
mode
- if mode is not "integer" then this contains the elements being permuted otherwise NULL
NULL
- the length of the multiset
- a pointer to the internal C++ Multicool object. Users should not use this unless they really know what they are doing
a vector of integers, reals, logicals or characters
James M. Curran
x = c(1,1,2,2) m1 = initMC(x) m1 ## a non-integer example x = rep(letters[1:4],c(2,1,2,2)) m2 = initMC(x) m2
Run the code above in your browser using DataLab