R/read_data.R

Defines functions read_data

#' @title Read Data
#' @description Read data from path
#' @importFrom readr read_csv
#' @export
read_data <- function(data_path) {
  if(is.null(data_path)){
    stop(simpleError("Path to data is NULL."))
  }
  if(!file.exists(data_path)){
    stop("Path to data non-existant: ", data_path)
  }
  readr::read_csv(data_path)
}
Display-Lab/pictoralist documentation built on April 1, 2020, 1:25 a.m.