I am trying to reshape a large dataframe (34645 x 11619) from wide to long. I would like to reshape the years 99 to 16. This means I have variables such as "edu99", "edu00", ... "edu16" or variables such as "p99d61", "p00d61", ..., "p16d61". The year string is not always on the same position.
Is there a way, to tell R to look for the the year strings "99-16" in the variable names when reshaping? (of course given that the string numbers uniquely identify the year).
Or in general, are there efficient strategy to reshape a big dataset?
Thank you so much for your help!
Best, Patrick