Contingency Table
Question 1
Your data.frame is
Generate (1) a one-way table for “purchased” and (2) a two-way table for “country” and “purchased.”
Question 2
Generate contingency table also known as rx C table using mtcars dataset.
Question 2.1
Add the addmargins() function to report on the sum totals of the rows and columns of “mtcars_df” table
Question 2.2
Add prop.tables() function, and report on the proportional weight of each value in the “mtcars_df” table