readbfile: read a PLINK bfile file into a matrix

View source: R/readbfile.R

readbfileR Documentation

read a PLINK bfile file into a matrix

Description

read a PLINK bfile file into a matrix

Usage

readbfile(
  bfile,
  keep = NULL,
  extract = NULL,
  exclude = NULL,
  remove = NULL,
  chr = NULL,
  fillmissing = F
)

Arguments

bfile

PLINK bfile (as character, without the .bed extension)

keep

samples to keep

extract

SNPs to extract

exclude

SNPs to exclude

remove

samples to remove

chr

a vector of chromosomes

fillmissing

Whether to fill missing values with 0

Value

A genotype matrix of 0,1, and 2 (possibly with NaNs)


SeojinHwang/scadsum documentation built on June 30, 2023, 10:52 p.m.