I am not sure exactly what your desired result is. Is this it?
All_Proc <- data.frame(Case.Index.Id=c("1a","1b","1c","2a","2b","2c"),
BiPAP=c(1,0,1,0,0,1),
CPAP=c(1,0,0,0,1,1),
Intubation=c(0,0,1,0,0,1),
O2=c(0,0,1,1,1,1))
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
AllProcMaster <- All_Proc %>% rowwise() %>%
mutate(NI_TX=BiPAP*CPAP,No_TX=BiPAP*CPAP*Intubation)
AllProcMaster
#> # A tibble: 6 x 7
#> # Rowwise:
#> Case.Index.Id BiPAP CPAP Intubation O2 NI_TX No_TX
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1a 1 1 0 0 1 0
#> 2 1b 0 0 0 0 0 0
#> 3 1c 1 0 1 1 0 0
#> 4 2a 0 0 0 1 0 0
#> 5 2b 0 1 0 1 0 0
#> 6 2c 1 1 1 1 1 1
Created on 2020-11-06 by the reprex package (v0.3.0)