main_createDataSet: create a data set with masked data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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.

Usage

1
create.dataset (input.file, output.file, seed = -1, percentage = 0.05)

Arguments

input.file

A character string containing a path to the input file, a genotypic matrix in the geno format.

output.file

A character string containing a path to the output file, a genotypic matrix in the geno format. The output file is the input file with masked genotypes. By default, the name of the output file is the same name as the input file with a _I.geno extension.

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.

Details

This is an internal function, automatically called by snmf with the entropy option.

Value

output.file

A character string containing a path to the output file, a genotypic matrix in the geno format.

Author(s)

Eric Frichot

See Also

geno snmf cross.entropy

Examples

1
2
3
4
5
6
7
8
# 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")

LEA documentation built on Nov. 8, 2020, 8:19 p.m.