read.tped.recode: Read .tped

Description Usage Arguments Details Value Examples

View source: R/datahandling.R

Description

Reads a .tped format genotype matrix and returns the R object needed by lfa.

Usage

1
read.tped.recode(tped.filename, buffer.size = 5e+08)

Arguments

tped.filename

Path to your .tped file after tranposing and recoding.

buffer.size

Number of characters to keep in the buffer

Details

Use –transpose and –recode12 on your plink formatted genotypes to generate the proper tped file. This is a pretty terrible function that uses a growing matrix for the genotypes so it is to your benefit to have as large a buffer.size as possible.

Value

genotype matrix with elements 0, 1, 2, and NA.

Examples

1
2
3
#assuming you have a .tped file in the right directory
x = NULL
## Not run: x = read.tped.recode("file.tped")

lfa documentation built on Nov. 8, 2020, 7:30 p.m.