morganlefey.com
For this assignment, we were given the data below, and asked to generate a table of the data.
2. Then we are asked to generate a contingency table using the built in mtcars dataset.
2.1 Using the addmargins() function, we can report on the sum totals of the rows and columns of assignment9 table.
2.2 Using prop.tables(), we can report on the proportional weight of each value.
2.3 Adding a margin of 1 to the argument under the prop.table() function will report on the row proportions: