Snitkin-Lab-Umich / regentrans

regentrans: R package for investigating regional pathogen transmission using genomic data
Other
5 stars 1 forks source link

Add check for patient_flow that no multiple rows with same source and destination facility #20

Closed zenalapp closed 3 years ago

zenalapp commented 3 years ago

When the user provides multiple rows with the same source and destination facility, the error is:

Error in mde(x) : 'list' object cannot be coerced to type 'double'

These errors occur because tidyr::pivot_wider in indirect_flow returns list elements.

Add check for this.

Example:

regentrans::patient_transfer(dplyr::bind_rows(regentrans::pt_flow,regentrans::pt_flow),NULL, regentrans::dists, regentrans::locs)