Learn R Programming

hlaR (version 1.0.0)

CalAlleleTopN: topN most frequent HLA alleles

Description

Input cleaned HLA(Human Leukocyte Antigen) data for a population of transplant donors and recipients to determine the most common alleles represented in the population.

Usage

CalAlleleTopN(dat_in, nms_don = c(), nms_rcpt = c(), top_n = 5)

Value

A tibble of top_n most frequent alleles.

Arguments

dat_in

A data frame with clean HLA typing data.

nms_don

A vector of donor's allele name(s).

nms_rcpt

A vector of recipient's allele name(s).

top_n

Number of alleles to return. Default is 5.

Examples

Run this code
dat <- read.csv(system.file("extdata/example", "HLA_MisMatch_test.csv", package = "hlaR"))
don <- c("donor.a1", "donor.a2")
rcpt <- c("recipient.a1", "recipient.a2")
re <- CalAlleleTopN(dat_in = dat, nms_don = don, nms_rcpt = rcpt, top_n = 2)

Run the code above in your browser using DataLab