cutEachCol {ClustMMDD}R Documentation

Retrieve data from strings in the dataset.

Description

It is assumed that each string in the data frame submitted represents a set of ploidy unordered observations from the same set of levels. For example, for ploidy = 2, the data "101102" represents "101", "102".

Usage

cutEachCol(xdata, ploidy)

Arguments

xdata

A data.frame or a matrix of strings.

ploidy

The number of unordered observations represented by a string in xdata. For example, for genotypic data from diploid individual, ploidy = 2 : a data such as "ab" represents {"a", "b"} observed alleles.

Value

A matrix of strings compatible with the main functions of ClustMMDD. The number of columns in the outcome data frame is equal to ploidy*ncol(xdata).

Author(s)

Wilson Toussile

See Also

dataR2C for ClustMMDD data format.

Examples

data(genotype1)
head(genotype1) 
genotype2 = cutEachCol(genotype1[,-11], ploidy = 2)
head(genotype2)

[Package ClustMMDD version 1.0.4 Index]