readLfmm: Read files in the 'lfmm' format

Description Usage Arguments Value Author(s) See Also Examples

Description

Read a file in the lfmm format.

Usage

1
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

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

Example output

[1] "genotypes.lfmm"

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