Skip to content

convert utility functions #6

@eeholmes-uw

Description

@eeholmes-uw

Context

Part of the roxygen2 migration. Issue #4 (NAMESPACE bootstrap) must be completed first.

Conversion rules (apply to all conversion issues)

  • Read only the Rd file for content — do not invent or infer anything not in the Rd.
  • Ignore the \usage{...} block — roxygen2 generates usage automatically.
  • Preserve math macros exactly: \eqn{latex}{ascii} and \deqn{latex}{ascii} — do not convert to $...$.
  • Keep \code{\link{fn}} cross-reference style as-is.
  • Convert: \strong{x}**x**, \emph{x}*x*, \code{x}`x`.
  • \title{} → first roxygen line (no tag).
  • \description{}@description, \details{}@details, \value{}@return.
  • \arguments{\item{name}{desc}}@param name desc.
  • \section{Title}{...}@section Title:.
  • \examples{}@examples (preserve \dontrun{} exactly).
  • \seealso{}@seealso, \references{}@references, \author{}@author.
  • \name{}@name (only if different from the function name).
  • \alias{}@aliases (only if different from the function name).
  • \keyword{internal}@keywords internal and no @export.
  • No \keyword{internal} → add @export.

Task

Three functions in R/utility_functions.R:

Rd file Function Exported?
man/zscore.Rd zscore Yes
man/ldiag.Rd ldiag Yes
man/match_arg_exact.Rd match.arg.exact No (\keyword{internal})

For each:

  1. Read the Rd file.
  2. Insert a roxygen #' block immediately above the function definition in R/utility_functions.R.
  3. Delete the Rd file.

After all three conversions, remove these lines from R/zzz_roxygen_exports.R:

#' @rawNamespace export(zscore)
#' @rawNamespace export(ldiag)

Verification

Run devtools::document() then devtools::check(). Commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions