In this section, we'll use grouping to summarize multiple y values for a given x value. Let's begin by implementing the following steps:
- Use grouping to group by genre and remove NULL values:
gp_scr <- group_by(HollywoodMovies,Genre)gp_scr <- na.omit(gp_scr)
- Calculate the mean and standard deviation using the summarise function and make a new dataset, as follows:
dfnew <- dplyr::summarise(gp_scr,as_mean=mean(AudienceScore),as_sd=sd(AudienceScore),n=n())
- We want to make a plot with scores ordered by means. Follow the steps in the code to do so. Plot the means, as follows:
- Make the final plot, ...