Vector indexing (1-based)
📖 Scenario: You are working with a list of daily temperatures recorded over a week. You want to access specific days' temperatures using their position in the list.
🎯 Goal: Learn how to access elements in a vector using 1-based indexing in R.
📋 What You'll Learn
Create a vector with exact temperature values
Create a variable to hold the index of the day to access
Use vector indexing with the variable to get the temperature
Print the accessed temperature
💡 Why This Matters
🌍 Real World
Accessing specific data points from a list of measurements, like daily temperatures, is common in data analysis and reporting.
💼 Career
Understanding vector indexing is essential for data scientists, statisticians, and anyone working with R for data manipulation.
Progress0 / 4 steps