Because rpv_indices() is deterministic, it may not present the minimum set that represents all variables. This procedure automates the process of randomly sampling the rows in the incoming matrix without replacement to find a minimum set.

rpv_find(tab, n = 10, sort = TRUE, cut = FALSE, progress = TRUE)

Arguments

tab

a numeric matrix with rownames

n

the number of permutations to perform

sort

when TRUE (default), the returned list will be sorted in order of number of samples.

cut

when TRUE, only the results with the minimum number of samples will be returned.

progress

when TRUE, a progress bar will be displayed.

Value

a list of character vectors

Examples

data(monilinia) # Iterate over the data 100 times and return only the minimum values set.seed(2018) rpv_find(monilinia, n = 100, cut = TRUE, progress = FALSE)
#> [[1]] #> [1] "A233" "A610" "A154" "A603" "A666" "A163" "A293" "A339" "A590" "A071" #> [11] "A085" "A218" "A269" "A074" "A182" "A417" "A681" "A176" "A366" "A489" #> [21] "A216" "A172" "A488" "A406" "A390" "A039" "A010" "A016" "A692" "A129" #>
# This is a random process and will not always return the same values set.seed(201) rpv_find(monilinia, n = 100, cut = TRUE, progress = FALSE)
#> [[1]] #> [1] "A233" "A610" "A154" "A603" "A666" "A163" "A293" "A339" "A590" "A071" #> [11] "A085" "A218" "A269" "A074" "A182" "A417" "A681" "A176" "A366" "A522" #> [21] "A216" "A172" "A488" "A408" "A390" "A547" "A385" "A303" "A523" "A571" #> [31] "A642" #> #> [[2]] #> [1] "A233" "A610" "A154" "A603" "A666" "A163" "A293" "A339" "A590" "A071" #> [11] "A085" "A218" "A269" "A074" "A182" "A417" "A681" "A176" "A366" "A522" #> [21] "A191" "A172" "A488" "A408" "A390" "A547" "A387" "A016" "A034" "A129" #> [31] "A165" #>