save_pairs: From a list of names, and unwanted pairs of names if...

View source: R/save_pairs.R

save_pairsR Documentation

From a list of names, and unwanted pairs of names if required, generate unique random pairs, and save them to a list of unwanted pairs to be avoided in future.

Description

From a list of names, and unwanted pairs of names if required, generate unique random pairs, and save them to a list of unwanted pairs to be avoided in future.

Usage

save_pairs(names_file = NULL, unwantedpairs_file = NULL, no_of_tries = 20)

Arguments

names_file

Path to a file containing a list of names in a single column.

unwantedpairs_file

Path to a file containing a list of unwanted pairs, with one name per column.

no_of_tries

Integer. The number of times to re-randomize and generate a round of pairs, if insufficent have been generated.

Value

Writes a csv file containing random pairs of names, and appends to or creates a file containing unwanted pairs.

Examples

## Not run: 
save_pairs(names_file = 'names.csv', unwantedpairs_file = 'unwantedpairs.csv')

## End(Not run)

moj-analytical-services/coffee_roulette_pairs documentation built on Aug. 6, 2022, 3:36 a.m.