read.plink.binary: Read PLINK binary file.

Description Usage Arguments Details Value

Description

read.plink.binary reads PLINK binary .bed file and the corresponding .bim and .fam file.

Usage

1
read.plink.binary(bed, bim = NULL, fam = NULL, na.strings = c("0", "-9"))

Arguments

bed, bim, fam

PLINK files with appropriate extensions.

na.strings

string vector, text entries to be treated as NA's.

Details

When the three files have the same name, only the .bed file needs to be specified.

Value

A list of three elements: genotype, fam and map. To be consistent with PLINK .bed file, genotype is a n_subject by n_marker matrix of counts of reference alleles. Missing values are -9. fam is a dataframe that contains the first six columns of a PLINK .ped file. map is a dataframe that contains the four columns of a PLINK .map file, with two additional columns: allele_1 for the reference allele type, allele_2 for the alternate allele type.


bowenwang7/r3 documentation built on May 17, 2019, 6:39 p.m.