thibautjombart / outbreaker

Disease outbreak reconstruction from epidemiological and genetic data
2 stars 1 forks source link

function `f2` in `outbreaker2:::summary.outbreaker_chains` #7

Open momozinho opened 3 years ago

momozinho commented 3 years ago

In outbreaker2:::summary.outbreaker_chains, function f2 is defined as: f2 <- function(x) { (sort(table(x), decreasing = TRUE)/length(x))[1] }

This leads to omission of imported cases in determining the infectors of each alpha column.

Suggest to add exclude = NULL so that the function becomes: f2 <- function(x) { (sort(table(x, exclude = NULL), decreasing = TRUE)/length(x))[1] }

Seen with @annecori