Calculate the lowest common ancestor (LCA) of a set of taxa

tax_lca(df)

Arguments

df

a data frame with taxonomic information, with columns representing taxonomic levels

Value

character

Examples

df <- data.frame(
  A = c("a", "a", "a", "a"),
  B = c("x", "x", "y", "y"),
  C = c("1", "1", "2", "3"),
  stringsAsFactors = FALSE
)
tax_lca(df)
#> [1] "a"