Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Sales and Revenue | Matrices
R Introduction: Part II
course content

Зміст курсу

R Introduction: Part II

R Introduction: Part II

1. Matrices
2. Data Frames
3. Lists

bookSales and Revenue

Let's consolidate acquired knowledge with a practical task!

Note

If you want to multiply each element of the row to a specific value (i.e., not one number for all elements), you need to have the condition: the number of rows of the matrix equals the multiplying vector length satisfied.

Завдання
test

Swipe to show code editor

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

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And vector of prices named prices.

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

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

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

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

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

Секція 1. Розділ 7
toggle bottom row

bookSales and Revenue

Let's consolidate acquired knowledge with a practical task!

Note

If you want to multiply each element of the row to a specific value (i.e., not one number for all elements), you need to have the condition: the number of rows of the matrix equals the multiplying vector length satisfied.

Завдання
test

Swipe to show code editor

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

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And vector of prices named prices.

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

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

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

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

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

Секція 1. Розділ 7
toggle bottom row

bookSales and Revenue

Let's consolidate acquired knowledge with a practical task!

Note

If you want to multiply each element of the row to a specific value (i.e., not one number for all elements), you need to have the condition: the number of rows of the matrix equals the multiplying vector length satisfied.

Завдання
test

Swipe to show code editor

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

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And vector of prices named prices.

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

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

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

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

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

Let's consolidate acquired knowledge with a practical task!

Note

If you want to multiply each element of the row to a specific value (i.e., not one number for all elements), you need to have the condition: the number of rows of the matrix equals the multiplying vector length satisfied.

Завдання
test

Swipe to show code editor

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

MonthSofaArmchairDining tableDining chairBookshelf
March1621302310
April4039132116
May1121363216

And vector of prices named prices.

SofaArmchairDining tableDining chairBookshelf
34015011545160

Your tasks are:

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

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 7
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt