I'm having an issue with the step where I merge the dorling cartogram with the data we manipulated:
por <- merge( POR_dorling, d, by.x="GEOID", by.y="tractid", all.x=T )
Since some variables were used in both the POR_dorling data frame and the d data frame, duplicate values are given .x and .y. But then in my dashboard it can't find any of the variables that happen to be duplicates since the variable name now has .x or .y attached to it.
I can't quite wrap my head around how to avoid the duplicate names in both data sets or how to avoid getting .x and .y affixed to the duplicate variables. The only solution I can think of is adding .x or .y to the variables in my code for the dashboard, but since not all variables have duplicates, I'd have to look up each one individually.
I'm having an issue with the step where I merge the dorling cartogram with the data we manipulated:
por <- merge( POR_dorling, d, by.x="GEOID", by.y="tractid", all.x=T )
Since some variables were used in both the POR_dorling data frame and the d data frame, duplicate values are given .x and .y. But then in my dashboard it can't find any of the variables that happen to be duplicates since the variable name now has .x or .y attached to it.
I can't quite wrap my head around how to avoid the duplicate names in both data sets or how to avoid getting .x and .y affixed to the duplicate variables. The only solution I can think of is adding .x or .y to the variables in my code for the dashboard, but since not all variables have duplicates, I'd have to look up each one individually.