% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{path_to_file}
\alias{path_to_file}
\title{Path to assemblykor CSV files}
\usage{
path_to_file(file = NULL)
}
\arguments{
\item{file}{Name of the CSV file. One of \code{"legislators.csv"},
\code{"wealth.csv"}, or \code{"seminars.csv"}.}
}
\value{
A character string with the full file path.
}
\description{
Returns the file path to CSV versions of the built-in datasets stored
in \code{inst/extdata}. Useful for teaching file I/O with
\code{read.csv()} or \code{readr::read_csv()}.
}
\examples{
# Read data from CSV (alternative to data())
path <- path_to_file("legislators.csv")
legislators_csv <- read.csv(path, fileEncoding = "UTF-8")
head(legislators_csv)

}
