cesaraustralia / GeneticRiskIndex

2 stars 2 forks source link

Join with column merge. #17

Closed rafaqz closed 3 years ago

rafaqz commented 3 years ago

https://github.com/cesaraustralia/GeneticRiskIndex/blob/92c39eba778452e430dce973742dbdd4e4abc518/R/prefilter.R#L71

This duplicates columns giving them x/y suffixes. The idea is to instead fill in precategorized_taxa with any new columns from preclustered_isolation_taxa, and use values from preclustered_isolation_taxa for other columns, where they are different.

We need to keep changes to risk, filter_category and error columns.

We need to add any columns that don't exist in the original table, and in the non-matching rows fill them with NAs.