在Formula.tools包中,我为 A <- B 之类的表达式定义并记录了 rhs 方法。
#' @rdname formula.parts
#' @aliases rhs,set-method
setMethod( 'rhs', '<-', function(x) x[[3]] )
(nb签名列表'<-'没有错,这里。其实就是这个赋值语句的类。)
对于此 S4 方法,roxyger2-3.1.0 在man/ formula.parts.Rd 中生成以下内容:
\S4method{rhs}{<-}(x)
我相信正确的文档标签应该是:
\S4method{rhs}{`<-`}(x)
有没有办法强制 roxygen2 生成正确的 Rd 语法?我挣扎了一下,但找不到方法。
背景
- R-3.0.1
- roxygen-3.1.0