R/test-fileFormat.R

Defines functions fileformat

Documented in fileformat

#' Utility function to check if file is a csv or tsv.
#'
#' @param dataf Path to input file
#' @return None
#'
fileformat <- function(dataf) {
if (endsWith(dataf, ".tsv") == FALSE & endsWith(dataf, ".csv") == FALSE){
  stop("This is not a supported file format. Please load in the
        total set of taxa as a TSV or CSV file.")
} else {
  message("File format is appropriate")
}
  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.