dataR2C: Transform a (normal) data frame to be compatible with ClustMMDD main functions
Description
dataR2C(x, ploidy) returns a list.
Usage
dataR2C(x, ploidy = 1)
Arguments
x
A data frame or a matrix with the number of columns equal to $number(variables)*ploidy$.
ploidy
The number of unordered observations represented by a string in xdata. For example, for genotypic data from diploid individual, $ploidy = 2$ : two columns for one variable.
Value
A list of elements needed for ClustMMDD main functions :
data : A matrix compatible with ClustMMDD main functions.
ploidy : The number of columns for each variable. It is the ploidy for genotypic data
N : The number of lines in x.
P : The number of categorical variables describing the dataset : $P = ncol(x)/ploidy$.
N_LEVELS : The vector of the numbers of levels for the variables.