% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/detect_masking.R
\name{detect_masking}
\alias{detect_masking}
\title{Function Masking Detective}
\usage{
detect_masking()
}
\value{
Invisibly returns a named list with components: \code{status} ("done" or
"clean"), \code{conflicts} (named list), \code{resolutions} (named list),
and \code{context} ("package" or "standalone").
}
\description{
Scans for namespace conflicts among attached packages and interactively
helps the user resolve them. The function adapts its recommendations
based on whether it detects a package development environment or a
standalone analysis script.
}
\details{
The function performs the following steps:
\enumerate{
  \item Identifies all functions that are masked by multiple attached packages.
  \item Interactively prompts the user to select the preferred package for each conflicting function.
  \item If a \code{DESCRIPTION} file is present (Package Development context), it suggests
      updating the \code{Imports} field and adding \code{@importFrom} roxygen2 tags.
  \item If no \code{DESCRIPTION} file is present (Standalone context), it generates a
      code snippet to explicitly assign the preferred functions and offers to apply them.
}
}
\section{Warning}{

This function modifies files on disk or the global environment. Please ensure you have a backup or are using version control (e.g., Git) before execution.
}

\examples{
if (interactive()) {
  detect_masking()
}
}
