Learn R Programming

gtx (version 0.0.8)

allelesAB: Paste together (vectors of) A and B alleles after sorting alphabetically.

Description

A tool to summarise and compare alleles when we do not care what order they are reported in, i.e. when A/G and G/A are considered the same.

Usage

allelesAB(A1, A2, sep = "/")

Arguments

A1
a vector of allele names.
A2
a vector of allele names, of same length as A1.
sep
string to use as a separator.

Value

A vector of combined allele names; elementwise A1 and A2 are pasted together in alphabetically increasing order.

Examples

Run this code
  data(t2d.scores)
  table(allelesAB(t2d.scores$coded.allele, t2d.scores$noncoded.allele))

Run the code above in your browser using DataLab