Merging data frames
📖 Scenario: You work in a small company that keeps customer and order information in separate tables. You want to combine these tables to see which customers made which orders.
🎯 Goal: Build a simple R program that merges two data frames: one with customer details and one with order details, using a common column.
📋 What You'll Learn
Create two data frames with exact given data
Create a variable for the common column name
Use the
merge() function with the common columnPrint the merged data frame
💡 Why This Matters
🌍 Real World
Combining customer and order data is common in business to analyze sales and customer behavior.
💼 Career
Data analysts and data scientists often merge data from different sources to prepare for analysis and reporting.
Progress0 / 4 steps