Primary exercises
In the survey dataset:
- Right-handedness
How many individuals are right handed?
Are there more right-handed males than females?
Count the number of females who never smoke. Do the same for males.
Produce the percentages of female and male non-smokers.
The variables
pulse
,height
andm.i
have missing values (NA
).
Count for each variable number of missing (NA). Use the function
is.na
(ref) as a condition to find the missing values.The variables height and m.i have the same amount of missing (NA), is it the case that these missing values are in the same observations (rows), i.e. that if height is missing then also m.i is missing at the same row?