Before df2tree check
before_tree(f_tax)
table
wrong_taxdf <- data.frame(
kingdom = c(rep(c("A", "B"), each = 4), "C", NA),
"phylum" = c("A", "a", "b", "c", "c", "c", "d", NA, NA, "e")
)
before_tree(wrong_taxdf)
#> Some name exist in different column:
#> A
#> Some name have NA parent:
#> phylum:e
#> Some name have different parents:
#> c
#> kingdom phylum
#> 1 A phylum_A
#> 2 A a
#> 3 A b
#> 4 A c_A
#> 5 B c_B
#> 6 B c_B
#> 7 B d
#> 8 B <NA>
#> 9 C <NA>
#> 10 e_parent e