haps_to_gen: Convert haplotype matrix to genotype matrix

Description Usage Arguments Details Value

View source: R/linear_crt.r

Description

Adds pairs of rows of a matrix to convert a haplotype matrix to a genotype matrix. For example, rows 1 and 2 are added to create row 1 of the output matrix. Rows 3 and 4 are added to create row 2 of the output matrix, and so on.

Usage

1

Arguments

H

An array with an even length in the first dimension.

Details

This function can also handle general arrays. It assumes that the first dimension indexes the haplotypes.

Value

An array of the same dimension as H, with the first dimension half as long.


stephenbates19/digitaltwins documentation built on Feb. 25, 2020, 12:41 a.m.