Learn R Programming

IBDhaploRtools (version 1.8)

h.to.g: Convert haplotype states to genotype states

Description

Convert haplotype states (1 - 15) to genotype states (1 - 9)

Usage

h.to.g(hap.states)

Arguments

hap.states
vector or matrix of haplotype states. Values should be integers from 1-9

Value

vector or matrix of same dimension as hap.states but with the corresponding genotypic states.

Examples

Run this code
## this example is taken from the package vignette.
##See vignette(IBDhaploRtools_tutorial)

data(trueibd_phased)
trueibd_unphased <- h.to.g( trueibd_phased )

Run the code above in your browser using DataLab