Hi there,

If I write a function with documentation (notice `\dontrun` section)

#' Print a string.
#'
#' @examples
#' \dontrun{
#' str_length(letters)
#'}
print_str <- function(str) {
  print(string)
}

`roxygenize()` will create proper Rd file, however, `R CMD check .` will
generate:
```
...
## Not run:
str_length(letters)
## End(Not run)
```

If a person not familiar with Rd (majority of people) see such example, I
do think he will be confused.
Question - wouldnt be good to remove `## NOT run` strings by default (
https://github.com/wch/r-source/blob/af7f52f70101960861e5d995d3a4be
c010bc89e6/src/library/tools/R/Rd2latex.R#L238
)

E.g. see https://cran.r-project.org/web/packages/gmailr/gmailr.pdf - and go
through example sections. There is not many people who would know what
those cryptic `## Not Run` strings mean.


thanks, Tomas

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to