Skip to content

Improve sentence style in @param documentation - #2455

Merged
yihui merged 1 commit into
masterfrom
fix-param-sentence-style
Aug 27, 2026
Merged

Improve sentence style in @param documentation#2455
yihui merged 1 commit into
masterfrom
fix-param-sentence-style

Conversation

@yihui

@yihui yihui commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Standardize all @param descriptions to proper sentence style (capitalize, end with period)
  • Convert Boolean/Logical params from "Boolean; whether to X" to "Whether to X" for consistency
  • Fix serial comma in "e.g." → "e.g.,"
  • Improve clarity and readability throughout

Changes

  • 22 @param blocks improved across 11 R files
  • All corresponding .Rd documentation regenerated

Closes #1481

🤖 Generated with Claude Code

@yihui
yihui force-pushed the fix-param-sentence-style branch 3 times, most recently from d2c9e2e to 633ac80 Compare August 27, 2026 18:10
Improve the roxygen documentation in two ways:

1. Sentence style (#1481): standardize @PARAM descriptions to proper
   sentences (capitalized, ending with a period), convert
   "Boolean;/Logical:" prefixes to "Whether to ...", and fix serial
   commas in "e.g.".

2. Markdown conversion: enable Roxygen markdown support and convert
   LaTeX-style markup to markdown using the roxygen2md package:
   - \code{x} -> `x`
   - \emph{x} -> *x*
   - \url{x} -> <x>
   - \href{u}{t} -> [t](u)
   - \code{\link{fn}} -> [fn()]
   - \code{pkg::\link{fn}} -> [pkg::fn()]

   Mixed link+method constructs (e.g. opts_chunk$set(), iconv(x, ...))
   are kept as \code{\link{}} since markdown has no clean nested form.
   Object links (knit_patterns, all_patterns) use [obj] without parens.

   Special-cased to avoid breakage:
   - Inline `r ...` expressions in fig_chunk/inline_expr docs are kept
     literal so they are not evaluated.
   - Code blocks in convert_chunk_header docs use 4-backtick fences so
     the inner triple backticks survive markdown processing.

All .Rd files regenerated and verified to parse cleanly.

Closes #1481

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@yihui
yihui force-pushed the fix-param-sentence-style branch from 633ac80 to 716cdd7 Compare August 27, 2026 18:24
@yihui
yihui merged commit 864cf79 into master Aug 27, 2026
10 checks passed
@yihui
yihui deleted the fix-param-sentence-style branch August 27, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentence style in Rd

1 participant