到目前为止,我正在学习RO2,并取得了很好的进展。我已经能够记录我正在处理的大多数包,但我有一些地方似乎不能正确。请考虑以下最小R:
##' Test Roxygen Comments
##'
##' This is a test of the Roxygen System. Had this been actual
##' documentation, it may have contained information about the
##' directives and/or structures below.
##'
##' @name simple
##' @docType data
##' @rdname simple
variable <- list(
##' itema comments
itema <- c("bing", "bang", "bong"),
##' itemb comments
itemb <- "fooflakes"
)
##' More info abuot variable!
##' @rdname simplelist()中的评论刚刚被Roxygen删除了,我已经证实了这一点:
> parse.file("package-test/R/simple.R")
$`1`
$`1`$description
[1] "Test Roxygen Comments\n\nThis is a test of the Roxygen System. Had this been actual\ndocumentation, it may have contained information about the\ndirectives and/or structures below.\n\n"
$`1`$name
[1] "simple\n"
$`1`$docType
[1] "data"
$`1`$rdname
[1] "simple"
$`1`$assignee
[1] "variable"
$`1`$srcref
$`1`$srcref$filename
[1] "package-test/R/simple.R"
$`1`$srcref$lloc
[1] 11 1 17 1 1 1我有一个选项设置基础设施,我想使用Roxygen来记录各个选项。我是否缩进评论似乎无关紧要,将它们向左移动似乎没有帮助。将@rdname添加到每个块似乎也没有帮助。我只是期待不存在的行为吗?在另一个问题中,被接受的答案是我们可以将Roxygen评论放在任何地方,并将它们收集起来。
所以有两个方面:我在上面遗漏了什么,如果不喜欢我的尝试,其他人如何记录单独的数据项?
谢谢!
发布于 2010-12-31 10:35:58
罗氧不会这么做的。我还需要5个字符才能成为官方答案。
https://stackoverflow.com/questions/4566003
复制相似问题