I'm stuck on R because can't figure out how to point to a specific data frame (but could be any type) by its name. This is because I need to combine data from different sources. See the example below:
data is split based on cities. The data frames have different amounts of rows and columns. The exact structure of each df isn't important here.
- df_city1 <- rows = 500, columns = 12
- df_city2 <- rows = 10, columns = 23
- df_city3 <- rows = 100, columns = 19
- df_city4 <- rows = 33, columns = 12
- df_city5 <- rows = 24, columns = 9
now I'll run over another data frame, call it df_master, which includes the names (as string) 'df_city1' until 'df_city5' in a certain column. Depending on the value of that particular 'city' column, a value has to be changed in one of the 5 data frames mentioned above.
so basically I need the value of df_master$city to point to the data frame mentioned under the first bullet. Something like
(df_master$city)[3] <- .....