Challenge: Arrange and Summarise Sales Data
You have already explored how to select, filter, and mutate data using dplyr. Now, you will put your skills to the test by arranging and summarizing sales data. In this challenge, you will work with a sales_data data frame to uncover key performance insights. You will need to arrange the data by revenue and then use the summarise() function to calculate both total and average sales. This exercise will help you reinforce your understanding of two essential data manipulation techniques and see how they work together to answer important business questions.
Swipe to start coding
Arrange the sales_data data frame by revenue in descending order and store the result in arranged_sales. Then, use summarise() to calculate the total and average number of units sold, storing these results in sales_summary.
- Arrange
sales_databy therevenuecolumn in descending order and assign toarranged_sales. - Calculate the sum of the
units_soldcolumn and assign astotal_salesinsales_summary. - Calculate the mean of the
units_soldcolumn and assign asaverage_salesinsales_summary.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 4.17
Challenge: Arrange and Summarise Sales Data
Swipe um das Menü anzuzeigen
You have already explored how to select, filter, and mutate data using dplyr. Now, you will put your skills to the test by arranging and summarizing sales data. In this challenge, you will work with a sales_data data frame to uncover key performance insights. You will need to arrange the data by revenue and then use the summarise() function to calculate both total and average sales. This exercise will help you reinforce your understanding of two essential data manipulation techniques and see how they work together to answer important business questions.
Swipe to start coding
Arrange the sales_data data frame by revenue in descending order and store the result in arranged_sales. Then, use summarise() to calculate the total and average number of units sold, storing these results in sales_summary.
- Arrange
sales_databy therevenuecolumn in descending order and assign toarranged_sales. - Calculate the sum of the
units_soldcolumn and assign astotal_salesinsales_summary. - Calculate the mean of the
units_soldcolumn and assign asaverage_salesinsales_summary.
Lösung
Danke für Ihr Feedback!
single