2
votes

I’m defining a function that has attributes:

#' Some function
f = structure(function (n) n * 2, class = 'foo')

Unfortunately, Roxygen then produces a documentation that looks as follows:

Description:

     Some function

Usage:

     f

Format:

     function (n)  
      - attr(*, "srcref")=Class 'srcref'  atomic [1:8] 7 19 7 36 19 36 7 7
       .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fb88cc395c0> 
      - attr(*, "class")= chr "foo"

I can fix the “Usage” block by manually specifying a different @usage. However, I also want to get rid of the “Format” block. The best I can achieve is to make it less conspicuous by specifying @format . (or similar) in the Roxygen comment. How can I remove it entirely?

Incidentally, it makes no difference if I define the function normally and add attributes later on.

1

1 Answers

2
votes

Use @format NULL to remove the format block.