Пакет документов для методов от roxygen - PullRequest
0 голосов
/ 03 февраля 2019

Я создал модель регрессии под названием полигональная линейная регрессия.Соответствующая функция - plr и возвращает объект класса plr.Чтобы показать сводку модели, я создал функцию сводки (summary.plr).Эта функция возвращает объект класса summary.plr.Кроме того, я создаю третью функцию для печати summary.plr объектов с именем print.summary.plr.Как я могу документировать метод print.summary.plr, используя roxygen2 и экспортировать метод для других функций в пакете?

Я пробовал так:

#' Print Summary Polygonal Linear Regression
#'
#' @description print arguments of the class "\emph{summary.plr}" and returns it \emph{invisibly} (via \code{\link[base]{invisible}} (x)).
#' @method print summary.plr
#' @param x an object of the class "\emph{summary.plr}".
#' @param digits  non-null value for \code{digits} specifies the minimum number of significant 
#' digits to be printed in values.
#' @param concise a \emph{logical} used to determine the type of digits.
#' @export

#Outuput

Description

print arguments of the class "summary.plr" and returns it invisibly (via invisible (x)).

Usage

## S3 method for class 'summary.plr'
print(x, digits = max(3L, getOption("digits") -
  3L), concise = FALSE, ...)
Arguments

x an object of the class "summary.plr".
digits non-null value for digits specifies the minimum number of significant digits to be printed in values.
concise a logical used to determine the type of digits.

Но я не знаюесли это правильный путь.

...