% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/documentation_metrics.R
\name{find_rd_for_fun}
\alias{find_rd_for_fun}
\title{Find an Rd document for a function using an index}
\usage{
find_rd_for_fun(fun, db, idx = NULL)
}
\arguments{
\item{fun}{Function name (character scalar).}

\item{db}{An Rd database list as returned by `tools::Rd_db()`.}

\item{idx}{Optional index from `build_rd_index()`. If `NULL`, it is built on demand.}
}
\value{
`NULL` if not found, otherwise a list with `rd` (the Rd object) and `filename` (the Rd filename).
}
\description{
Tries `fun.Rd`, then alias-based resolution via the index, and as a last
resort matches the topic name if it equals the function name.
}
\keyword{internal}
