write.lfmm {LEA}R Documentation

Write files in the lfmm format

Description

Write a file in the lfmm format.

Usage

write.lfmm(R, output.file)

Arguments

R

A matrix containing the genotypes with one line for each individual and one column for each SNP. The missing genotypes have to be encoded with the value 9.

output.file

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

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

read.lfmm lfmm.data lfmm geno2lfmm lfmm2geno ancestrymap2lfmm ped2lfmm

Examples

# Creation of a file called "genotypes.geno" in the working directory,
# with 1000 SNPs for 165 individuals.
data("tutorial")

# write R in a file called "genotypes.lfmm"
# Create file:    "genotypes.lfmm".
write.lfmm(tutorial.R,"genotypes.lfmm")

# read the file "genotypes.lfmm".
R = read.lfmm("genotypes.lfmm")

[Package LEA version 3.6.0 Index]