Suppose a researcher wants to put together a final dataset using two dataframes, left_frame and right_frame. In the left
Posted: Fri May 20, 2022 5:43 pm
Suppose a researcher wants to put together a final dataset using two dataframes, left_frame and right_frame. In the left_frame, an observation is identified by a given state, year and age group. However, in the right_frame, an observation is identified by a given state and year. Which of the following is the correct R script to merge these frames? ... A. merge(left_frame, right_frame, by = c("state", "year", "age group")) B. merge(left_frame, right_frame, by = "state") C. dplyr::right_frame %>% left join(left_frame, by = "state") O D. dplyr:: left_frame %>% left_join(right_frame, by = c("state", "year","age_group")) E. merge(left_frame, right_frame, by = c("state", "year"))