Skip to content

convert CSEGriskfigure.Rd to roxygen header #7

@eeholmes-uw

Description

@eeholmes-uw

Description:

I am migrating the documentation for this package to Roxygen2. I am starting with a single file to test the workflow.

Your task is to read the existing manual file man/CSEGriskfigure.Rd and translate its contents entirely into a Roxygen2 comment block (#'). You will insert this Roxygen2 block at the very top of R/CSEGriskfigure.R and then delete the original .Rd file.

CRITICAL CONSTRAINTS:

  1. DO NOT read or analyze the R code to generate documentation. You must rely strictly on the text provided in the .Rd file. Do not invent, infer, or summarize anything.
  2. Complete Translation: The resulting Roxygen header must contain everything from the .Rd file, with the sole exception of the \usage{...} block. Ignore the \usage{...} block entirely; Roxygen2 will generate this automatically.
  3. Markdown Syntax: You must translate standard .Rd formatting into Roxygen2 Markdown:
    • \strong{text} -> **text**
    • \emph{text} -> *text*
    • \code{text} -> `text`

Mapping & Formatting Instructions:

  • Basic Tags:

    • \name{} -> @name
    • \alias{} -> @aliases
    • \title{} -> The first line/title of the Roxygen block (no tag needed).
    • \description{} -> @description
    • \details{} -> @details
    • \author{} -> @author
    • \references{} -> @references
    • \seealso{} -> @seealso
    • \examples{} -> @examples (Preserve all \dontrun{...} blocks exactly as they are).
  • Arguments & Nested Lists: * Map \arguments{} into individual @param [name] [description] tags for each primary \item{}.

    • If an argument contains a nested list (e.g., a \describe{ \item{...}{...} } block inside the control argument), convert the nested items into an indented Markdown bulleted list under that @param's description.
      • Format: * [item_name]: [item description]
  • Sections & Returns: * Translate \section{title}{...} to @section title: ...

    • Translate \value{...} to @return. Because the .Rd file uses \item{name}{description} inside \value{}, convert these items into a Markdown bulleted list under the @return tag.
      • Format: * [name]: [description]
  • Internal vs. Export: * Check the .Rd file for \keyword{internal}.

    • If \keyword{internal} exists, add @keywords internal to the Roxygen block and DO NOT add an @export tag.
    • If \keyword{internal} does not exist, append @export to the bottom of the Roxygen block (just above the function definition).
  • Links: Convert .Rd links to Roxygen2 Markdown links:

    • \link{function} -> [function()]
    • \link[package]{function} -> [package::function()]
    • \href{url}{text} -> [text](url)
  • Math (CRITICAL): R package documentation requires specific math tags. Do not convert math into standard Markdown or LaTeX $ or $$ tags. You must meticulously preserve the exact R documentation math macros, including the two-argument fallback structure: \eqn{latex}{ascii} for inline math and \deqn{latex}{ascii} for display math.

Notes:

  1. Once done you can delete the file man/CSEGriskfigure.Rd.
  2. Update the DESCRIPTION file to use Roxygen.
  3. If possible, test that the package builds and that the pdf of the documentation builds.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions