-
Notifications
You must be signed in to change notification settings - Fork 0
convert CSEGriskfigure.Rd to roxygen header #7
Description
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:
- DO NOT read or analyze the R code to generate documentation. You must rely strictly on the text provided in the
.Rdfile. Do not invent, infer, or summarize anything. - Complete Translation: The resulting Roxygen header must contain everything from the
.Rdfile, with the sole exception of the\usage{...}block. Ignore the\usage{...}block entirely; Roxygen2 will generate this automatically. - Markdown Syntax: You must translate standard
.Rdformatting 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 thecontrolargument), convert the nested items into an indented Markdown bulleted list under that@param's description.- Format:
* [item_name]: [item description]
- Format:
- If an argument contains a nested list (e.g., a
-
Sections & Returns: * Translate
\section{title}{...}to@section title: ...- Translate
\value{...}to@return. Because the.Rdfile uses\item{name}{description}inside\value{}, convert these items into a Markdown bulleted list under the@returntag.- Format:
* [name]: [description]
- Format:
- Translate
-
Internal vs. Export: * Check the
.Rdfile for\keyword{internal}.- If
\keyword{internal}exists, add@keywords internalto the Roxygen block and DO NOT add an@exporttag. - If
\keyword{internal}does not exist, append@exportto the bottom of the Roxygen block (just above the function definition).
- If
-
Links: Convert
.Rdlinks 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:
- Once done you can delete the file
man/CSEGriskfigure.Rd. - Update the DESCRIPTION file to use Roxygen.
- If possible, test that the package builds and that the pdf of the documentation builds.