I would like to generate a large number of 2x2 contingency tables in r studio, using a specified probability in each column.
If i had an example where a column has title '1', then there would be a 20% chance that a person could be allocated to that row, otherwise, the second row - with a total number of 20 people.

The data needs to be randomly generated. For example, we have 20 males who are randomly allocated in either attending or not attending a sporting event (20% chance of attending) and 20 females who are either attending or not attending (20% chance of attending). How could i generate 100 contingency tables of these random occurrences?