R/rd-s4.R

Defines functions format.rd_section_slot roxy_tag_rd.roxy_tag_slot roxy_tag_parse.roxy_tag_slot format.rd_section_field roxy_tag_rd.roxy_tag_field roxy_tag_parse.roxy_tag_field

#' @export
roxy_tag_parse.roxy_tag_field <- function(x) tag_name_description(x)
#' @export
roxy_tag_rd.roxy_tag_field <- function(x, base_path, env) {
  value <- setNames(x$val$description, x$val$name)
  rd_section(x$tag, value)
}
#' @export
format.rd_section_field <- function(x, ...) {
  rd_section_description("Fields", names(x$value), x$value)
}

#' @export
roxy_tag_parse.roxy_tag_slot <- function(x) tag_name_description(x)
#' @export
roxy_tag_rd.roxy_tag_slot <- function(x, base_path, env) {
  value <- setNames(x$val$description, x$val$name)
  rd_section(x$tag, value)
}
#' @export
format.rd_section_slot <- function(x, ...) {
  rd_section_description("Slots", names(x$value), x$value)
}

Try the roxygen2 package in your browser

Any scripts or data that you put into this service are public.

roxygen2 documentation built on Sept. 8, 2021, 9:08 a.m.