We will continue to work with the same data as in the previous set of exercises. By now, you should (hopefully) have saved them as an .rds file and, hence, be able to easily load them (in case they are not already/still in your current R workspace/working environment).

corona_survey <- readRDS("./data/corona_survey.rds")

1

Using base R, print a simple table with the frequencies of the variable education_cat. Also include the counts for missing values.
The argument for including missing values in the resulting table is useNA = "always".

2

Next, use a combination of base R functions to get the proportions for the variable sex rounded to four decimal places.
You need to wrap table() into two other functions: One for creating the proportion table and another one for rounding the decimal places.

3

Now, use functions from the dplyr package to get the frequencies and proportions for the sex variable (without worrying about the number of decimal places this time).
We first need to count the cases and then transform the resulting variable to get proportions.

4

Use a function from the summarytools package to display the counts and percentages for the categories in the age_cat variable. The output should not include information about the totals.
Check the help file for the function to see how to exclude the totals from the output.