% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enrich.R
\name{enrich}
\alias{enrich}
\title{Enrich a data frame with an EFSA catalogue.}
\usage{
enrich(dataframe, catalogue, joinBy, enrichedColumnName)
}
\arguments{
\item{dataframe}{\code{data.frame}. The data frame to be enriched.}

\item{catalogue}{\code{data.frame}. The data frame that contains the EFSA
catalogue to be used for the enrichment. It must contain at least two
columns, namely: NAME and CODE.}

\item{joinBy}{\code{character} (string). The variable to be used as the join key.}

\item{enrichedColumnName}{\code{character} (string). The name of the column added
to the original data.}
}
\value{
The specified data frame enriched with the catalogue data.
}
\description{
This function takes a data frame and joins it with an EFSA catalog. The EFSA
catalog must be itself a data frame.
}
\examples{
dataframe_ <- iris |> dplyr::rename(CODE = Species)

catalogue_ <- iris |>
  dplyr::rename(CODE = Species) |>
  dplyr::mutate(NAME = "test") |>
  dplyr::select(CODE, NAME) |>
  unique()

enriched_ <- enrich(
  dataframe = dataframe_,
  catalogue = catalogue_,
  joinBy = "CODE",
  enrichedColumnName = "enrichedColumn")

}
