% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read.R
\name{tl_read_rdata}
\alias{tl_read_rdata}
\title{Read an RData file}
\usage{
tl_read_rdata(path, name = NULL, ...)
}
\arguments{
\item{path}{Path to an RData file.}

\item{name}{Optional name of the object to extract from the RData file. If
\code{NULL} (default), the function returns the first data frame found, or
errors if there are multiple data frames.}

\item{...}{Currently unused.}
}
\value{
A \code{tidylearn_data} object (a \link[tibble]{tibble} subclass)
with attributes \code{tl_source}, \code{tl_format}, and
\code{tl_timestamp}.
}
\description{
Reads an RData (\code{.rdata} or \code{.rda}) file
into a \code{tidylearn_data} object. Since RData files
can contain multiple objects, use the \code{name}
argument to specify which object to extract.
If \code{name} is \code{NULL} and
the file contains exactly one data frame, it is returned automatically.
}
\examples{
\donttest{
# data <- tl_read_rdata("path/to/data.rdata")
# data <- tl_read_rdata("path/to/data.rdata", name = "my_data")
}

}
