r - roxygen 方法的包文档
问题描述
我创建了一个名为多边形线性回归的回归模型。对应的函数是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.
但我不知道这是否是正确的方法。
解决方案
推荐阅读
- html - 即使模态缩放,关闭按钮也保持在右上角
- icons - GTK3应用程序un ubuntu 20.04中的图标
- protractor - 在量角器getText()中获取[object Object]而不是值
- php - 未定义变量:subjects(查看:B:\laravel2\forum\resources\views\home.blade.php)
- python - 使用 Openpyxl:如何使用 pandas DataFrame 覆盖特定 Excel 工作表上的所有数据
- kubernetes - 带有 directoryOrCreate 的 Kubernetes hostPath 不起作用
- python - 删除以换行符分隔的 json 中的键
- javascript - 动态数据是否可以共享一个状态而不用相同的内容更新所有状态?
- java - 单元测试中的测试覆盖范围是什么?
- reactjs - Lint DOM/Component 属性值到 camelCase