create two dataframes and then join them by column variable in r
# Create two dataframesdf1 <- data.frame(ID = 1:3, Name = c("Alice", "Bob", "Charlie"))df2 <- data.frame(ID = 1:3, Age = c(25, 30, 28))# Join the dataframes by the common column "ID"result <- merge(df1, df2, by = "ID")
# View the resultprint(result)