]> code.communitydata.science - stats_class_2020.git/blobdiff - psets/pset5-worked_solution.rmd
adding proportions table (and hopefully nothing else)
[stats_class_2020.git] / psets / pset5-worked_solution.rmd
index 32ced5cef1e6b686e9ca692755d36612a89b5bc4..f2c8991eef93fb3e3c087f42906b51388380b575 100644 (file)
@@ -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

Community Data Science Collective || Want to submit a patch?