[R] Combinations of true/false values where one pair is mutually exclusive

R Stafford rod@@t@fford @ending from gm@il@com
Thu Aug 2 03:20:04 CEST 2018


I have 6 variables, (A,B,C,D,E,F) that can either pass or fail (i.e., true
or false).
I can get a table of all pass/fail combinations with this:

scenarios <- expand.grid(A = c("pass", "fail"), B = c("pass", "fail"), C =
c("pass", "fail"), D = c("pass", "fail"), E = c("pass", "fail"), F =
c("pass", "fail"))

But I have the extra condition that if E is true, then F must be false, and
vice versa, so what I don't know is how to get all combinations when E and F
are mutually exclusive.

	[[alternative HTML version deleted]]



More information about the R-help mailing list