forked from atsa-es/MARSS
-
Notifications
You must be signed in to change notification settings - Fork 0
convert utility functions #6
Copy link
Copy link
Open
Description
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 internaland 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:
- Read the Rd file.
- Insert a roxygen
#'block immediately above the function definition inR/utility_functions.R. - 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels