Row and column indexing
📖 Scenario: You work in a small shop and keep track of daily sales in a table. You want to learn how to find specific sales data by looking at rows and columns.
🎯 Goal: Learn how to select specific rows and columns from a data frame in R using row and column indexing.
📋 What You'll Learn
Create a data frame called
sales with exact valuesCreate a variable called
day_index to select a specific rowUse row and column indexing to select the sales amount for that day
Print the selected sales amount
💡 Why This Matters
🌍 Real World
Selecting specific rows and columns from tables is common when working with sales data, customer data, or any spreadsheet-like information.
💼 Career
Data analysts and scientists often need to extract specific data points from large tables using row and column indexing.
Progress0 / 4 steps