Skip to contents

Returns a data frame with HLA-A, -B and -DRB1 haplotypes from MNDP by race and sampled by their frequencies

Usage

hla_sample_mndp(n, replace, origin)

Arguments

n

An integer to define the number of rows

replace

A logical value for sampling with replacement

origin

A character value from options: 'API', 'AFA', 'CAU' and 'HIS'

Value

A data frame

Examples

hla_sample_mndp(n = 1000, replace = TRUE, origin = 'CAU')
#> # A tibble: 1,000 x 7
#>        A     B    DR      api      afa      cau      his
#>    <dbl> <dbl> <dbl>    <dbl>    <dbl>    <dbl>    <dbl>
#>  1     2    18    11 0.000259 0.00160  0.00472  0.00296 
#>  2     2    51    11 0.00116  0.00109  0.00412  0.00500 
#>  3    25    18    15 0.000145 0.000904 0.00502  0.00289 
#>  4    11    27     1 0.000134 0.000239 0.000987 0.00310 
#>  5     1     7    15 0.000899 0.00188  0.00523  0.00179 
#>  6    30     7    15 0.000138 0.00160  0.000375 0.000388
#>  7    24    39     7 0.000046 0.000038 0.000209 0.000252
#>  8    33    14     1 0.000765 0.000871 0.00498  0.00796 
#>  9    68    35     1 0.000255 0.000606 0.00062  0.00110 
#> 10     1     8     3 0.00299  0.0119   0.0625   0.0169  
#> # ... with 990 more rows