Question: (a) (13') Read the dataset into R and save it to the workspace. Verify that the data has been loaded correctly. The Habit variable contains

(a) (13') Read the dataset into R and save it to the workspace. Verify that the data has been loaded correctly. The Habit variable contains the smoker status for the mother of each baby in the sample. There are several observations in the data for which there is no information about the mother's smoker status. How many observations are in this category? What is the name of the category (level) in the Habit variable for these observations? Create a bar plot of the mother's smoker status in the data. Change the color of the bars from the default grey color to a different color of your choice. The droplevels 0 function drops unused levels from a factor or from factors in a data frame. Extract the observations in the data for which we know the mother's smoker status [either smoker or non-smoker) and drop the unused level from the Habit variable. Save this subset of the data as a separate data frame in the workspace. Using the data frame from (d), create side-byside boxplots of the weight variable split by the mother's smoker status
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
