Primary exercises

On the survey dataset:

  1. Report mean hand spans {span1,span2} per gender.

  2. Report mean and median age per gender, including the size of each gender group.

  3. Report mean pulse per gender and exercise group, including size of each group. Do the same for gender and smokes group.

  4. Report the mean age of those who exercise frequently per gender including the group size

  5. Recall primary exercise (7) section Summarise, do the same using group_by.

Extra exercises

  1. Produce the following results:

1.a frequency of hand categories per gender.

# A tibble: 4 × 3
# Groups:   gender [2]
  gender hand      n
  <chr>  <chr> <int>
1 female left      7
2 female right   110
3 male   left     10
4 male   right   106

1.b frequency of fold categories of females.

# A tibble: 3 × 3
  gender fold        n
  <chr>  <chr>   <int>
1 female left       47
2 female neither     6
3 female right      64

1.c most popular name initials in descending order of popularity. See ?stringr::str_sub for extracting initials from a character vector.

# A tibble: 20 × 2
   initial     n
   <chr>   <int>
 1 C          25
 2 J          21
 3 L          19
 4 M          18
 5 A          17
 6 G          17
 7 B          15
 8 R          14
 9 D          12
10 E          11
11 T          10
12 V           9
13 F           8
14 H           8
15 S           8
16 W           6
17 N           5
18 K           4
19 P           4
20 I           2


Copyright © 2023 Biomedical Data Sciences (BDS) | LUMC