get_rafs_all_reps_from_popcnts {RAFS}R Documentation

Get all representatives from their popcnts

Description

This helper function works on results of get_rafs_reps_popcnts to obtain all representatives at the chosen number of clusters.

Usage

get_rafs_all_reps_from_popcnts(reps_popcnts, n_clusters)

Arguments

reps_popcnts

representatives' popcnts for the chosen variant as obtained from get_rafs_reps_popcnts

n_clusters

the desired number of clusters

Value

A vector of all representatives.

Examples

library(MDFS)
mdfs_omp_set_num_threads(1)  # only to pass CRAN checks
data(madelon)
rafs_results <- run_rafs(madelon$data, madelon$decision, 2, c(12345))
rafs_reps_popcnts <- get_rafs_reps_popcnts(rafs_results, 5)
get_rafs_all_reps_from_popcnts(rafs_reps_popcnts$stig_single, 5)

[Package RAFS version 0.2.4 Index]