Question: R Data Exploration Assignment: Tidyverse Fundamentals. Use the R code structure: task1 % filter(cyl == 4 | cyl == 6) %>% group_by(variable) %>% summarise(Count =
R Data Exploration Assignment: Tidyverse Fundamentals." Use the R code structure: task1 <- data_cars %>% filter(cyl == 4 | cyl == 6) %>% group_by("variable") %>% summarise(Count = n()). Task 1: Filtering and Summarizing Categorical Data (3 points) The variable cyl (number of cylinders) is a categorical variable (nominal/ordinal, even though coded numerically). We'll focus on cars with 4 or 6 cylinders. Filter the data_cars tibble to include only cars with 4 or 6 cylinders (cyl == 4 or cyl == 6). (Example: Create a frequency table (a simple count) of the cyl variable for this filtered subset. Use group_by() and summarise() with the n() function. Copy and paste the result into your document. Describe what the resulting table tells you about the distribution of $4$ and $6$ cylinder engines in this limited sample. Based on these information, please help me to do this "#Task 1: Filter for 4 or 6 cylinders and create a frequency table task1_summary <- data_cars %>% #1Filter for cars where 'cyl' is 4 OR 6 filter(cyl == 4 | cyl == 6) %>%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
