R/read_tax_example.R

Defines functions read_tax_example

Documented in read_tax_example

#' Get path to example taxonomy files
#'
#' Access the files in speedyseq's inst/extdata sub-directory
#'
#' @param file Name of file to return.
#' @returns Returns the full path to the requested file from the package sub-directory inst/extdata if it exists, or a list of the files in the directory if no file is specified.
#' @export
#' @examples
#' read_tax_example()
#' read_tax_example("rdp_table.tsv")
read_tax_example <- function(file = NULL) {
  if (is.null(file)) {
    dir(system.file("extdata", package = "speedytax"))
  } else {
    system.file("extdata", file, package = "speedytax", mustWork = TRUE)
  }
}

Try the speedytax package in your browser

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

speedytax documentation built on May 29, 2024, 2:47 a.m.