Hi Rod,
How about this?

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

Jim



On Thu, Aug 2, 2018 at 11:20 AM, R Stafford <rod.staff...@gmail.com> wrote:
> 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]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to