Hi,
I have got a question about counting of combinations of respondents' replies.
This is my df:
apartment_renovations <- structure(list(savings = c(1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1), bank_loans = c(
0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 1, 1, 1, 1, 0, 1
), relatives_loans = c(
1, 1, 0, 1, 1,
0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1,
1, 1, 0, 0, 0
), instalments = c(
1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0
), other = c(
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
)), class = c(
"tbl_df",
"tbl", "data.frame"
), row.names = c(NA, -31L))
This is about getting money for apartment renovations, from savings, bank_loans, relatives_loans, instalments and other possibilities. My question is how to count all combinations of the above I mean: only savings, savings and relatives_loans, etc. I would like to make a plot of it if possible. Thank you for your ideas and help.