Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Data Extraction | Data Frames
R Introduction: Part II

Course Content

R Introduction: Part II

1. Matrices
2. Data Frames
3. Lists

# Data Extraction

Finish the section with practice on abstract local furniture store selling data!

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

Everything was clear?

Section 2. Chapter 7

# Data Extraction

Finish the section with practice on abstract local furniture store selling data!

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

Everything was clear?

Section 2. Chapter 7

# Data Extraction

Finish the section with practice on abstract local furniture store selling data!

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.

Everything was clear?

Finish the section with practice on abstract local furniture store selling data!

You will work with the data below. This data is stored in the `store` variable.

 Item Price Sold Sofa 340 67 Armchair 150 81 Dining table 115 79 Bookshelf 160 42 Kitchen Cabinet 70 67

1. Add a new column named `'Revenue'` with the revenue of each item (multiply `'Price'` and `'Sold'`). To access columns, use the `\$` sign.
2. Using the `sum()` function, calculate the total number of items sold. Save in `items_sold` variable and output its value.
3. Calculate total revenue using `sum()` function. Save in the `total_revenue` variable and output its value.
4. Find out the average price of the sold item - divide `total_revenue` by `items_sold`.