create.dataset {LEA} | R Documentation |
create.dataset
creates a data set with a given percentage of
masked data from the original data set. It is used to calculate the
cross.entropy
criterion.
create.dataset (input.file, output.file, seed = -1, percentage = 0.05)
input.file |
A character string containing a path to the input file,
a genotypic matrix in the |
output.file |
A character string containing a path to the output file,
a genotypic matrix in the |
seed |
A seed to initialize the random number generator. By default, the seed is randomly chosen. |
percentage |
A numeric value between 0 and 1 containing the percentage of masked genotypes. |
This is an internal function, automatically called by snmf
with
the entropy
option.
output.file |
A character string containing a path to the output file,
a genotypic matrix in the |
Eric Frichot
# Creation of tuto.geno # A file containing 400 SNPs for 50 individuals. data("tutorial") write.geno(tutorial.R,"genotypes.geno") # Creation of the masked data file # Create file: "genotypes_I.geno" output = create.dataset("genotypes.geno")