Adding and removing columns
📖 Scenario: You work in a small shop and keep track of your products in a table. Sometimes you need to add new information or remove old details from this table.
🎯 Goal: Learn how to add new columns and remove existing columns in an R data frame.
📋 What You'll Learn
Create a data frame with product names and prices
Add a new column for stock quantity
Remove the price column
Print the final data frame
💡 Why This Matters
🌍 Real World
Managing product information in a shop or business often requires updating tables by adding new details or removing outdated ones.
💼 Career
Data analysts and data scientists frequently manipulate data frames to prepare data for analysis or reporting.
Progress0 / 4 steps