#This function needs to be the initial guess of the said contestants
#initial guesses would be similar to the create contestants function
#subsequent guesses should account for previous guess/truth booth rounds
guess = function(correctData, previousKnown){
pairs = nrow(correctData)
previousKnown %>%
pull(male) %>%
str_remove(., "m")%>%
as_numeric()
contestantNums = seq_along(1:pairs)
#combine the contestant vector with F to generate F1... Fn
female = sprintf("f%s", contestantNums)
#randomly assign the female contestants to the male counterparts
guess = tibble(
female = sample(female, size = pairs, replace = FALSE),
male = sprintf("m%s", contestantNums)
)
print(correctData)
print(guess)
semi_join(correctData, guess) %>%
print()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.