% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_covr_modes.R
\name{load_package_datasets}
\alias{load_package_datasets}
\title{Load Datasets from a Package}
\usage{
load_package_datasets(pkg_names, env, source_paths = NULL, overwrite = FALSE)
}
\arguments{
\item{pkg_names}{A character string specifying the name of the package.}

\item{env}{A character string specifying the covr env}

\item{source_paths}{A character string specifying the source paths}

\item{overwrite}{A logical specifying whether datasets should be overwritten}
}
\value{
A character vector of dataset names that were attempted to be loaded.
Returns `NULL` if the package is not installed.
}
\description{
Loads all datasets from a specified installed package into the cov environment.
It first attempts to load `.rda` files from the package's `data/` directory.
If none are found, it falls back to using `data()` to load datasets listed in the package metadata.
}
\details{
This function is intended for internal use. It silently attempts to load each dataset
and suppresses errors if loading fails. Datasets are loaded into the cov environment.
}
\keyword{internal}
