I downloaded the shapefile data from US census bureau, class is both dataframe, am trying to merge subregion in both, so I have changed NAME in the previous counties which is reflecting from the names lines of code. However, merging would not work, I have explored all possible merging function.
Check column names used in left_join
Check for missing values in merging columns
iowa_map_sf <- st_as_sf(iowa_map)
merged_data <- left_join(iowa_map_sf, data, by = c("subregion" = "subregion"))
#merged_data <- merge(iowa_map_sf, data, by.x = "subregion", by.y = "subregion", all.x = TRUE)