KIR_present: KIR present/absent

Description Usage Arguments Value Examples

View source: R/kir.R

Description

Determine whether the KIR is present, given a KIR string. Assumes a string with only "NEG" is absent, any other string not including "NEG" is present, if missing or some combination together with "NEG" return NA - see examples.

Usage

1
KIR_present(string)

Arguments

string

KIR string vector

Value

logical vector, TRUE if the KIR is present, FALSE if it's not present, NA if passed an empty/NA string

Examples

1
2
dat <- data.frame(kirstring = c("003/034+003/034", "NEG", "", NA, "003|NEG"), stringsAsFactors = FALSE)
KIR_present(dat$kirstring)

bosefalk/CTUtools documentation built on Feb. 4, 2022, 4:10 p.m.