Get minimum set of individual indices to represent all alleles in a population

rpv_indices(tab)

Arguments

tab

an n x m matrix of individuals in rows and alleles in columns.

Value

a vector of integers representing row indices in the tab

Examples

data(monilinia) i <- rpv_indices(monilinia) i
#> [1] "A233" "A610" "A154" "A603" "A666" "A163" "A293" "A339" "A590" "A071" #> [11] "A085" "A218" "A269" "A074" "A182" "A417" "A681" "A008" "A366" "A176" #> [21] "A489" "A191" "A172" "A394" "A406" "A390" "A039" "A010" "A016" "A398" #> [31] "A034" "A088" "A012"
all(colSums(monilinia[i, ], na.rm = TRUE) > 0)
#> [1] TRUE