replace_dups: Replace duplicates.

View source: R/phylo_utils.R

replace_dupsR Documentation

Replace duplicates.

Description

This is a support function for the main function toPhylo_transmatOrigin.

Replace duplicated in the form o ID_origin or ID_migrant by the correct tip name.

Usage

replace_dups(dup_tip, origNodes, tipNamesOri, tip_names_toInsert, tip_names)

Arguments

dup_tip

Vector of duplicated tips

origNodes

Vector of vertex IDs.

tipNamesOri

Vector in the form of ID_origin or ID_migrant. This vector contain the duplicated vertex when considering only the ID.

tip_names_toInsert

Vector of the correct value of tip name to use in the phylogenetic tree in the form of ID_origin or ID_migrant

tip_names

Vector of tip names in the form of ID only. This vector will contain the duplicated ID or IDs.

Value

Vector of tip names in the form of ID_origin or ID_migrant to use as tip.labels in the phylogenetic tree.


thednainus/HIVepisimAnalysis documentation built on Sept. 21, 2023, 7:32 a.m.