test_df <- data.frame(
cdu = c(rep(FALSE, 9), TRUE),
cdu_fdp = c(rep(FALSE, 8), TRUE, TRUE),
cdu_fdp_greens = c(TRUE, TRUE, rep(FALSE, 6), TRUE, TRUE))
calculate_probs(test_df, list("cdu", "cdu_fdp", "cdu_fdp_greens"))
calculate_probs(test_df, list("cdu", "cdu_fdp", "cdu_fdp_greens"), exclude_superior=FALSE)
Run the code above in your browser using DataLab