Question: Suppose that the data from the previous problem is in a data frame called data which has two columns: miletime with the data used for
Suppose that the data from the previous problem is in a data frame called data which has two columns: miletime with the data used for the table on the previous page, and a logical vector called smoker that is TRUE for everyone who is a current smoker and FALSE for everyone else. ( a) Write code to find the mean time to run a mile for both smokers and non-smokers. (b) Using the same data frame as in a), write code using ggplot() to make a histogram for the mile times for just the smokers, with the same class intervals as on the previous page (you can assume there aren't any values at the endpoints of those intervals if that makes it easier to think about). (c) In making the histogram in part b) did you ever use an argument called y? Whether you used it or not, what does that argument mean in this context?
Only Typing
Not a picture
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
