translinks {bitrugs} | R Documentation |
Compute the number of transmission links separating two nodes in a transmission tree.
translinks(p1, p2, patID, psource)
p1 |
Patient ID 1. |
p2 |
Patient ID 2. |
patID |
Vector of patient IDs. |
psource |
Vector of transmission sources corresponding to |
Returns the number of transmission links separating two patients in the transmission tree. If patients belong to unconnected transmission trees, -1 is returned. Directions of transmission links are disregarded.
data(hospitaldata) # Patients 48 and 58 are 3 links apart translinks(48,58,hospitaldata$epi[,1],hospitaldata$epi[,5]) # Patients 89 and 58 are in separate transmission chains translinks(89,58,hospitaldata$epi[,1],hospitaldata$epi[,5])