Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Sales and Revenue | Section
Practice
Projects
Quizzes & Challenges
Вікторини
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookChallenge: Sales and Revenue

Note
Note

If you want to multiply rows (or columns) by different values, the length of the vector you use must match the number of rows (or columns) in the matrix. This ensures that each row (or column) element is multiplied by the corresponding value.

Завдання

Swipe to start coding

You have the selling data for a local furniture store stored in the sellings matrix:

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And a vector of prices named prices:

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

  1. Output the total number of items sold each month.
  2. Transpose the sellings matrix and reassign the result to the sellings variable.
  3. Find out the revenue for each good by multiplying sellings and prices. Save the result in the income variable.
  4. Output the monthly revenues.
  5. Output the total three months' revenue.

Рішення

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

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

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

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

single

Запитати АІ

expand

Запитати АІ

ChatGPT

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

close

bookChallenge: Sales and Revenue

Свайпніть щоб показати меню

Note
Note

If you want to multiply rows (or columns) by different values, the length of the vector you use must match the number of rows (or columns) in the matrix. This ensures that each row (or column) element is multiplied by the corresponding value.

Завдання

Swipe to start coding

You have the selling data for a local furniture store stored in the sellings matrix:

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And a vector of prices named prices:

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

  1. Output the total number of items sold each month.
  2. Transpose the sellings matrix and reassign the result to the sellings variable.
  3. Find out the revenue for each good by multiplying sellings and prices. Save the result in the income variable.
  4. Output the monthly revenues.
  5. Output the total three months' revenue.

Рішення

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

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

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

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

single

some-alt