Does anyone have advice on how to create a contigency table in R? For reference, I have one categorical variable (let us call this financial class) and then one outcome variable, coded as binary (0/1) to indicate Yes or No. Is there an easier way to code this contingency table and how do we go about adding counts and percentages? If anyone has a sample code that they could explain that would be great!
Also, wondering the best way to format it. How can we add in kable or kableExtra to make it look better?