Example 10.1. Let the blood types and gender of 40 persons are as follows:
(O,Male),(O,Female),(A,Female),(B,Male),(A,Female),(O,Female),(A,Male), (A,Male),(A,Female),(O,Male),(B,Male),(O,Male),B,Female),(O,Male),(O,Male), (A,Female),(O,Male),(O,Male),(A,Female),(A,Female),(A,Male),(A,Male), (AB,Female),(A,Female),(B,Female),(A,Male),(A,Female),(O,Male),(O,Male), (A,Female),(O,Male),(O,Female),(A,Female),(A,Male),(A,Male),(O,Male), (A,Male),(O,Female),(O,Female),(AB,Male).
Summarizing data in a two-way frequency table by using SPSS:
Can I use R to do so?
You should post your data in a more useable form. Such as posting the output of
dput(x)
, wherex
is the name of your dataset. Most of the work was to get what you've posted in adata.frame
.In
base R
there are functions to create two-way tables.