X-Git-Url: https://code.communitydata.science/stats_class_2020.git/blobdiff_plain/548d95f43d088a4b092c93ebe809fca39be5138b..fee4a69906c247a2157f1932be4015d0226017c0:/psets/pset5-worked_solution.rmd?ds=sidebyside diff --git a/psets/pset5-worked_solution.rmd b/psets/pset5-worked_solution.rmd index 32ced5c..f2c8991 100644 --- a/psets/pset5-worked_solution.rmd +++ b/psets/pset5-worked_solution.rmd @@ -70,6 +70,8 @@ summary(df) obama.tbl <- table(took_fruit=df$fruit, saw_flotus=df$obama) obama.tbl +obama.prop.tbl <- proportions(table(took_fruit=df$fruit, saw_flotus=df$obama), margin=2) +obama.prop.tbl ``` ## PC4. Test for differences between groups