R S4 roxygen2文档 [英] R S4 roxygen2 documentation

查看:157
本文介绍了R S4 roxygen2文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在S4中使用roxygen2作为文档,由于某些原因,使用部分没有出现。我做了一个简单的例子来表明我的困惑:

I'm using roxygen2 for documentation in S4 and for some reason the usage section is not showing up. I made a simple example to show my confusion:

#' Title
#'
#' @param x Temp
#'  
#' @return Nothing of interest.
#' 
#' @export 
#' @docType methods
#' @rdname A-methods
setGeneric("A", function(x, ...){
  cat("test\n")
  standardGeneric("A")
})

#' @rdname A-methods
#' @aliases A,ANY,ANY-method
setMethod("A", "ANY", function(x, ...){
  cat(class(x))
})

#END#


推荐答案

p> IMHO这是一个常见的问题。您可以尝试使用roxygen的 s4 分支。 (对于我的小包,它的效果很好)。要从 github 安装 s4 分支:

IMHO that is a common problem. You could try to use the s4 branch of roxygen. (For my small packages it works well.). To install the s4 branch from github:

library("devtools")
install_github("roxygen", "klutometis", ref="s4")

这篇关于R S4 roxygen2文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆