Calculating a Weighted Share of a Larger Group

Hi folks, 

I've got a bit of a conundrum. I am trying to replicate a Pew analysis of multi-racial groups by mapping ancestry onto race (Pew's methodology is here, and is not super clear). Basically, I am using R to try to create a simple racial breakdown of each ancestry, such that I can create a new racial variable based on which ancestries respondents select. 

From Pew: "For example, 79% of ACS respondents with Ecuadorian ancestry identify themselves as white on the race question, so people with Ecuadorian ancestry are classified as white."

Basically, I am trying to transform ANC1P and ANC2P into their own racial categories, and then sum up the folks for whom these racial categories are different. At the moment, I can't figure out how to do it in a way that doesn't require me to individually check each ancestry by race. 

What I imagine would work, though I don't know how to do it, is have R calculate how many of each individual ANC1P response answers RAC1P as white, black and so on, and then if >75% of the weighted totals are of one racial category, assign that particular racial category to every ANC1P responses that share that category. 

I am not sure how clear that is, but any help would be appreciated and happy to try to clarify further if that could help. 

I am currently using the 2015-2019 PUMs dataset, and would try to replicate this backwards through to 1980 if possible. 

Thanks all, 

Peter