Skip to content

Instantly share code, notes, and snippets.

@jefferys
Last active September 3, 2022 22:13
Show Gist options
  • Save jefferys/1a49a95b9ed636556250 to your computer and use it in GitHub Desktop.
Save jefferys/1a49a95b9ed636556250 to your computer and use it in GitHub Desktop.
R package documentation with roxygen2
#====================================
# Demo package roxygen2 documentation
#====================================
# This shows how things do work, including wierd corner cases, not
# how they should be done. Most of the information comes from
# http://r-pkgs.had.co.nz/man.html
#' Brief page title describing this package.
#'
#' This is the introductory Description paragraph in the documentation, comes
#' before everything else and auto-wraps. Must be separated by a
#' blank comment line from the title (Not a REAL blank line).
#'
#' This is the details section that comes after usage. This and any following
#' paragraphs without @@section labels are part of the details section
#'
#' This is a second paragraph in the details section.
#' @section Some section:
#' This is the first paragraph in the section "Some section".
#' Any further paragraphs will also be in some section, up until a new
#' @@roxygen2_tag. Note: no blank lines are needed before a tag. Also note
#' that the colon is required.
#'
#' This is a new paragraph.
#'
#' @section Final section:
#'
#' Shows that skipping lines between tags and text, or skipping multiple lines
#' between paragraphs makes no difference.
#'
#'
#'
#' See? Note: All Description generally comes before the
#' specific function tags as they are more reasonably placed just before the
#' function definition.
#'
#' @docType package
#' @name FusionExpressionPlot
NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment