% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ingest.R
\name{read_dataset}
\alias{read_dataset}
\title{Read a dataset file into a data frame}
\usage{
read_dataset(path, config)
}
\arguments{
\item{path}{Character. Path to the file to read.}

\item{config}{Named list. Merged configuration as returned by
\code{\link{load_config}}. Must include \code{format} (\code{"csv"} or
\code{"fwf"}). For FWF files, \code{fwf_widths} is required and
\code{fwf_col_names} and \code{fwf_skip} are optional.}
}
\value{
A data frame with all columns as character vectors.
}
\description{
Reads a CSV or fixed-width file, coercing all columns to character and
trimming whitespace. Encoding and delimiter are taken from \code{config}.
}
\examples{
cfg_dir <- system.file("demonstrations/config", package = "dqcheckr")
cfg  <- load_config("starwars_csv", config_dir = cfg_dir)
path <- system.file("demonstrations/data/starwars.csv", package = "dqcheckr")
df   <- read_dataset(path, cfg)

}
