I have 40 dataframes from two dataframes (growth and investment) that I separated using the group split() function (split per COROP region in the Netherlands). The following code can be used to combine the divided dataframes for each COROP, which is what I'm trying to do:
# COROP 1
Growth per COOP and investment per COOP are bound by the function cbind(CR01), # combining investment and growth statistics for COOP 1
CR01 <- CR01[-c(4:6)] # eliminating redundant columns
# COROP 2
Growth per corop[[2]], investment per corop[[2]] cbind(CR02) # combining investment and growth statistics for COOP 2
CR02 <- CR02[-c(4:6)] # eliminating redundant columns
etc.
Given my inadequate understanding of loops and the time it would take me to repeat this manually for COROP 1 to 40, I was wondering if anyone could assist me. Can the code above be repeated using a loop?