% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topic.R
\name{topic_qualifier}
\alias{topic_qualifier}
\title{Find the package qualifier for a topic}
\usage{
topic_qualifier(topic, from, packages = character())
}
\arguments{
\item{topic}{A single string naming an alias, matched exactly.}

\item{from}{The name or source directory of the package you are linking
from. If it documents \code{topic}, no qualifier is needed.}

\item{packages}{A character vector of additional packages to search,
typically the dependencies of \code{from} (as computed by
\code{\link[=pkg_search_deps]{pkg_search_deps()}}). \link[=pkg_search_base]{Base packages} are always
included.}
}
\value{
\itemize{
\item \code{NULL} if the topic isn't documented by \code{from}, \code{packages}, or the base
packages.
\item \code{NA_character_} if the topic needs no qualifier because it's documented
by \code{from} or a base package.
\item Otherwise, the package name(s) that could qualify the topic: usually
one, but more if the topic is ambiguous, in which case it's up to the
caller to decide how to respond.
}
}
\description{
Determines whether a topic needs a package qualifier when linking from the
documentation of another package. The \code{from} package is checked first,
followed by \code{packages}, and then the base packages. Re-exported objects
are attributed to their original package. Results are cached alongside the
\code{from} package's topic index, so repeated lookups are cheap.
}
\examples{
topic_qualifier("rnorm", "stats")
}
