Question: Use R for this assignment. Submit your assignment on Blackboard as a doc, docx, or pdf file by due date/time to receive full credit. U
Use R for this assignment. Submit your assignment on Blackboard as a doc, docx, or pdf file by due date/time to receive full credit.
Use the gss_cat dataframe in the forcats package.
You should also load the tidyverse and dplyr packages.
1)summarize a tibble with the minimum, maximum, and median of age and hours of TV, grouped by race (3 points
Paste your code and output
2)Create dataset called age_TV with the output from #1, arrange the order of the rows to the following: Black, Other, White. Print the dataset. (3 points)
Paste your code and output
3)Research the cut function (suggested website). Start with the gcc_cat data frame. Use the cut function to create character variable for age (age_cat) with following categories: 18-29, 30-39, 40-49, 50-59, and 60+-89. Create new data frame (age_TV) with the new variable, and hours of TV. Create tibble with the count (frequency) and mean hours of TV grouped by age group. (4 points)
Paste your code and output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
