R/dataset_checks.R
dataset_check_outlier_by_genus.RdAs dataset_check_outlier_by_species(), but compares each value with the
values other datasets report for any taxon in the same genus, as given by
the genus column of the database's taxa table. Use it for taxa that too
few other datasets have measured for the species-level check, bearing in
mind that species within a genus can legitimately differ by far more than
individuals within a species: a genus of herbs and trees will flag every
tree. Taxa without a genus, such as names resolved only to family, are not
checked.
Compiled database object, e.g. austraits
dataset_id's to check. The default, NULL, checks every
dataset in the database against the rest.
Traits to check. The default, NULL, checks every numeric
trait that cannot be negative.
Values that differ from other_median by at least this
factor, in either direction, are listed in records. The default, 100, is
higher than for species: in a sample from AusTraits, values 30- to 100-fold
from the rest of their genus were often species that genuinely differ,
while most beyond 100-fold were errors.
Minimum number of other datasets with values for the taxon and trait for a value to be compared. The default, 2, means a value is only flagged when it disagrees with the consensus of at least two other datasets, rather than with a single one that might be the one in error. Set it to 1 to also check taxa only one other dataset has measured.
List of groups of value_types to compare with each
other; see Details. A value whose value_type is in no group is not
checked.
As dataset_check_outlier_by_species(), with genus and
n_other_taxa added to records.
other_median is the median, across every taxon in the genus and every
other dataset, of the median of each taxon's values in each dataset, so each
taxon a dataset measured counts once. n_other_taxa is the number of taxa
those values come from.
if (FALSE) { # \dontrun{
dataset_check_outlier_by_genus(austraits, "Ooi_2007")$records
} # }