So I want to create a two-way table, called ‘height_table’ of heights based on variables ‘Gender’ and ‘University’ in R? The table should contain the total for each row and column of the table.
Height Shoesize Gender University
1 155 34 female Sussex
2 156 36 female Sussex
3 158 34 female Sussex
4 178 43 male Sussex
5 160 38 female Essex
6 166 42 male Essex
7 168 44 male Sussex
8 173 43 male Essex
9 274 45 female Sussex
10 162 38 female Essex
11 175 43 male Essex
12 162 37 female Sussex
13 163 33 female Essex
14 164 0 female Sussex
15 176 42 male Sussex
16 165 39 female Essex
17 166 38 female Sussex
Please help
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…