I have the following table:
df <- tribble(~name, ~label, ~year, ~id,
"base1.dta", "Generated biographical information", 1990, "gbi",
"base2.dta", "Generated biographical information", 1991, "gbi",
"base3.dta", "Generated biographical information", 1992, "gbi",
"base4.dta", "Generated biographical information", 1993, "gbi",
"base5.dta", "Data on children from household questionnaire", 1990, "dchq",
"base6.dta", "Data on children from household questionnaire", 1991, "dchq",
"base7.dta", "Data on children from household questionnaire", 1992, "dchq",
"base8.dta", "Data on children from household questionnaire", 1993, "dchq",
"base9.dta", "Data from individual questionnaires", 1990, "diq",
"base10.dta", "Data from individual questionnaires", 1991, "diq",
"base11.dta", "Data from individual questionnaires", 1992, "diq",
"base12.dta", "Data from individual questionnaires", 1993, "diq")
The data frames contained in the name column are all in the same path of my project with the same name as in the df. I want to loop or purrr over this table (which of course is much longer) in the following way: if they have the same value in the label column, search the corresponding name provided by the name column and bind_rows all of those data frames and assign them to a data frame called id. Then, I want to save those objects named by id as .rds in a different path.