Roxygen Listing Documents

I am studying Roxygen and have made good progress. I was able to document most of the package I'm working on, but I have a few places that seem to be wrong. Please consider the following minimum R values:

##' 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 simple 

Comments that are inside list() are simply deleted by Roxygen. I confirmed this with

 > 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 

I have a parameter framework for which I would like to use Roxygen to document individual parameters. It doesn't seem to matter if I really indent the comments, moving them left and left doesn't seem to help. Adding @rdname to each block does not help either. Am I just expecting behavior that doesn't exist? In another question, the accepted answer said that we can post Roxygen comments anywhere and that they will be collected.

So, two folds: what am I missing above, and how do other people document individual data elements if I don't like my attempt?

Thanks!

+4
source share
1 answer

Roxygen does not. I need 5 more characters to be the official answer.

+4
source

Source: https://habr.com/ru/post/1333839/


All Articles