207 Question
Schlüsselwörter
Aufgaben, Statistik, Prognose, Modellierung, R, Datenanalyse, Regression
Was ist der richtige R-Code, um das Diagramm zu erzeugen?
**R-Code A**
flights %>%
ggplot(aes(x = hour, y = dep_delay)) +
geom_boxplot(aes(group = hour)) +
geom_smooth() +
coord_cartesian(ylim = c(-10, 60)) +
scale_x_continuous(breaks = 1:24)
**R-Code B**
flights %>%
select(dep_delay, hour) %>%
ggplot(aes(x = hour, y = dep_delay)) +
geom_boxplot(aes(group = hour)) +
coord_cartesian(ylim = c(-10, 60)) +
scale_x_continuous(breaks = 1:24)
**R-Code C**
flights %>%
select(arr_delay, hour) %>%
ggplot(aes(x = hour, y = arr_delay)) +
geom_boxplot(aes(group = hour)) +
geom_smooth(method = 'lm') +
coord_cartesian(ylim = c(-10, 60))
**R-Code D**
flights %>%
select(dep_delay, hour) %>%
ggplot(aes(y = hour, x = dep_delay)) +
geom_boxplot(aes(group = dep_delay)) +
geom_smooth(method = 'lm') +
coord_cartesian(ylim = c(-10, 60)) +
scale_x_continuous(breaks = 1:24)
**R-Code E**
flights %>%
select(dep_delay, hour) %>%
ggplot(aes(x = hour, y = dep_delay)) +
geom_boxplot(aes(group = hour)) +
geom_smooth(method = 'lm') +
coord_cartesian(ylim = c(-10, 60)) +
scale_x_continuous(breaks = 1:24)
208 Solution
Der Code-Auszug E ist korrekt.
209 Meta-information
exname: flights-geom_point-geom-lm extype: schoice exsolution: 00001 exshuffle: false
