Getting all possible combinations for 2x2 tables with fixed margins and totals

I tried stubbornly:

marg_combos_2 <- sapply(marg_combos[[3]],"[[", 'p.value') %>% as.data.frame()

sapply(marg_combos[[3]],"[[", 'p.value', drop=FALSE)

marg_combos_3 <- cbind(marg_combos, marg_combos_2)

colnames(marg_combos_3$.) <- "P_values_extracted"

names(marg_combos_3)

colnames(marg_combos_3)[which(names(marg_combos_3) == ".")] <- "P_values_extracted"

marg_combos_4 <-  marg_combos_3 %>% select(1,2,4)

marg_combos_4 %>% 
  rowwise() %>% 
  mutate_if(is.list, ~paste(unlist(.), collapse = '|')) %>% 
  write.csv('marg_combos_4_final.csv', row.names = FALSE)

Key to the solutions was this:

marg_combos[[3]],"[[", 'p.value'

I have done it by many trial and error attempts.

And then in Excel straightaway:

Maybe someone could propose a simpler solution or with purrr more efficient one ?
I was stuck a bit when it came to get to a deeper elements of nested list.