R/taxon_testr.R

Defines functions taxon_testr

Documented in taxon_testr

#' Utility function to check taxon_names in parsed data file
#'
#' @param tax_frame Dataframe of taxa parsed from datafile.
#' @return None
#'
taxon_testr <- function(tax_frame) {
    if (all(grepl("_", tax_frame$taxon))) {
    }
    else {
      warning("Taxon dataframe tips must be formmatted in genus_species format.
              If this is a higher order taxon with no species name, please                   format as taxon_sp.")
      stop
    }
    message("Taxon dataframe names formatted correctly")
    return(0)
  }

Try the treestartr package in your browser

Any scripts or data that you put into this service are public.

treestartr documentation built on May 1, 2019, 8:03 p.m.