Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Arrange and Summarise Sales Data | Data Manipulation with dplyr
Data Manipulation in R (Core)

bookChallenge: 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_data by the revenue column in descending order and assign to arranged_sales.
  • Calculate the sum of the units_sold column and assign as total_sales in sales_summary.
  • Calculate the mean of the units_sold column and assign as average_sales in sales_summary.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 6
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: 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_data by the revenue column in descending order and assign to arranged_sales.
  • Calculate the sum of the units_sold column and assign as total_sales in sales_summary.
  • Calculate the mean of the units_sold column and assign as average_sales in sales_summary.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 6
single

single

some-alt