R/taxonomy.R

Defines functions taxonomy_handler

Documented in taxonomy_handler

#' This function creates a taxonomic coverage data object.
#'
#' @export
#' @import taxize
#' @examples \dontrun{
#' datpath <- system.file("inst/ext/data_gbif_1.csv", package = "mdextract")
#' dat <- read.csv(datpath)
#' taxonomy_handler(input=dat, fields=c('name'))
#' }

taxonomy_handler <- function(input, genus_epithet=NULL, genus=NULL, epithet=NULL, subspecies=NULL)
{  
  if(is.null(fields) || !is.character(fields)) stop("Please supply fields to use for taxonomy coverage")
  
  out <- 'XX'
  class(out) <- 'coverage_taxonomy'
  return(out)
}
ropensci/mdextract documentation built on May 18, 2022, 5:37 p.m.