Check that the trait are compatible with the tree. Throws an error if not. Assumes that the trait and tree tips are in the same order, using function checkTraitTree.
checkDuplicates(trait, tree)
Arguments
trait: (named) vector or matrix of traits being tested.