Question
I'm learning R - specifically box plots with notches. I'm working in R Studio online with the flights data. I'm trying to find the median
I'm learning R - specifically box plots with notches. I'm working in R Studio online with the flights data. I'm trying to find the median distance between airports for canceled flights vs. non-canceled flights. I thought it would start with creating a new feature for canceled flights and I entered the code below, but I keep getting error messages. This is what I have to create a new feature:
mutate(canceled = is.na(dep_time), sched_hour = sched_dep_time %/% 100, sched_min = sched_dep_time %% 100, sched_dep_time = sched_hour + sched_min / 60) %>%
Or is this not the correct first step?
And after the above first step, I thought this would be the next step to create a box plot with notches:
ggplot(data = flights) + geom_boxplot(mapping =aes(x=distance, y = canceled), notch = TRUE)
Please help.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started