Primary exercises

In the survey dataset:

  1. Select teenagers, assume age range between and including 10 and 19.

  2. Select all females with pulse equal to 60

  3. Select all male teenagers with pulse above 60.

  4. How many males do smoke and never exercise?

  5. How many females never smoke and frequently exercise?

  6. Produce the following tibbles:

    6.1 Personal information {Name,Age,Gender,Height} of all teenagers.

    6.2 Personal information of males with Height between and inclusive 170 to 180.

  7. Has survey data missing pulse values? If so how many? What about age?

Extra exercises

  1. What is the percentage of males who never smoke and frequently exercise? Do the same for female.

  2. What is the age range in teenagers? You may use the range function (?range).

  3. How many males do smoke and never exercise? Use ‘%in%’ operator see ?match for more details.

  4. Recall where helper function in select extra exercises. Hint: see anyNA function (see ?anyNA for the manual).

    4.1 Select all variables from survey data having missing values.

    4.1 Count the number of missing values for variable you found in 4.1.

    4.3 In (4.2) you found that height and m.i had the same number of missing values, n=27. How can you confirm or refute that missing values of height and m.i occur in the same observations?



Copyright © 2022 Biomedical Data Sciences (BDS) | LUMC