roxygen2-pkgdownlisted
Install: claude install-skill choxos/BiostatAgent
# roxygen2 and pkgdown
## Overview
Complete reference for roxygen2 documentation syntax and pkgdown site configuration. Covers all roxygen2 tags, cross-referencing, and advanced pkgdown customization.
## roxygen2 Fundamentals
### Basic Tags
```r
#' @title Short title (optional, first paragraph used if omitted)
#' @description Longer description (optional, second paragraph used if omitted)
#' @details Additional details section
#' @param name Description of parameter
#' @return Description of return value
#' @examples Runnable R code
#' @export Add function to NAMESPACE exports
#' @keywords keyword1 keyword2
#' @author Author Name
```
### Parameter Documentation
```r
#' @param x A numeric vector of values.
#' @param y Character string specifying the method. One of:
#' - `"method1"`: Description of method 1
#' - `"method2"`: Description of method 2
#' @param data A data frame containing:
#' \describe{
#' \item{col1}{Description of column 1}
#' \item{col2}{Description of column 2}
#' }
#' @param ... Additional arguments passed to [other_function()].
#' @param .data Internal use only. Data frame to process.
```
### Return Value Documentation
```r
#' @return A numeric vector of the same length as `x`.
#' @return A list with components:
#' \describe{
#' \item{fitted}{Fitted values from the model.}
#' \item{residuals}{Model residuals.}
#' \item{coefficients}{Named vector of coefficients.}
#' }
#' @return A tibble with columns:
#' * `term`