Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions chapter2.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ msg3 <- "Keep trying!"
msg4 <- "Try again."
msg5 <- "Nope, try again."

test_mc(1, feedback_msgs = c(msg1, msg2, msg3))
test_mc(1, feedback_msgs = c(msg1, msg2, msg3, msg4, msg5))
```

*** =attachments
Expand Down Expand Up @@ -422,11 +422,11 @@ The markdown file contains the instuctions to answer the multiple choice questio
<strong>Q10. Determine the on time arrival percentage based on whether the flight departed on time or not. What percent of flights that were "delayed" departing arrive "on time"?</strong>

*** =instructions
- Number 1 - 0.24
- Number 2 - 0.25
- Number 3 - 0.27
- Number 4 - 0.29
- Number 5 - 0.30
- Number 1 - 0.15
- Number 2 - 0.17
- Number 3 - 0.18
- Number 4 - 0.21
- Number 5 - 0.22


*** =hint
Expand Down
9 changes: 2 additions & 7 deletions datasets/lab2_ex10.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ output:
css: lab.css
---

10. Suppose you define a flight to be "on time" if it gets to the destination on
time or earlier than expected, regardless of any departure delays. Mutate the data
frame to create a new variable called `arr_type` with levels `"on time"` and
`"delayed"` based on this definition. Then, determine the on time arrival percentage
based on whether the flight departed on time or not. What percent of flights that
were `"delayed"` departing arrive `"on time"`?
10. Suppose you define a flight to be "on time" if it gets to the destination on time or earlier than expected, regardless of any departure delays. Mutate the data frame to create a new variable called `arr_type` with levels `"on time"` and `"delayed"` based on this definition. Also mutate to create a new variable called `dep_type` with levels `"on time"` and `"delayed"` depending on the flight was delayed for fewer than 5 minutes or 5 minutes or more, respectively. In other words, if `arr_delay` is 0 minutes or fewer, `arr_type` is `"on time"`. If `dep_delay` is less than 5 minutes, `dep_type` is `"on time"`. Then, determine the on time arrival percentage based on whether the flight departed on time or not. What percent of flights that were `"delayed"` departing arrive `"on time"`?
<strong>Answer Question 10 to the left.</strong>

```{r load-packages, message = FALSE, echo = FALSE}
Expand All @@ -26,4 +21,4 @@ library(ggplot2)
```{r on-time-arr-perc}
# type your code for Question 10 here, and Knit

```
```