read.lfmm {LEA}R Documentation

Read files in the lfmm format

Description

Read a file in the lfmm format.

Usage

read.lfmm(input.file)

Arguments

input.file

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

Value

R

A matrix containing the genotypes with one line per individual and one column per SNP.

Author(s)

Eric Frichot

See Also

write.lfmm lfmm.data lfmm geno2lfmm lfmm2geno ancestrymap2lfmm ped2lfmm

Examples

# tutorial contains a matrix of genotypes R with 1000 SNPs for 165 individuals.
# and a matrix with an environmental variable C.
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 2.2.0 Index]