egenn / rtemis

Advanced Machine Learning and Visualization
https://rtemis.org
GNU General Public License v3.0
137 stars 19 forks source link

gam2table(): should it be exported? #55

Closed HenrikBengtsson closed 9 months ago

HenrikBengtsson commented 9 months ago

R CMD check reports on:

  Undocumented arguments in documentation object 'gam2table'
    ‘mods’ ‘modnames’
  Documented arguments not in \usage in documentation object 'gam2table':
    ‘x’ ‘xnames’ ‘include_anova_pvals’

While looking at this, I noticed that rtemis:::gam2table() is documented by not exported;

https://github.com/egenn/rtemis/blob/31cd8eb57e0a8f0d715b7beedd190bb0910193f5/R/glm2table.R#L1-L20

Should it be exported?

FWIW, it looks like R CMD check picks up another gam2table from one of the dependencies.

egenn commented 9 months ago

Not at this point. I added #' @keywords internal to both glm2table() and gam2table()

HenrikBengtsson commented 9 months ago

Got it. So, in recent versions of R (I think >= 4.3.0), R CMD check now checks all man/ pages, which I think required ditto functions to be exported. I created PR #56 that adds #' @noRd to this function to fix the check warning that you otherwise gets.

egenn commented 9 months ago

Should I add #' @noRd to all #' @keywords internal functions?

egenn commented 9 months ago

I guess that's rOpenSci's recommendation (https://devguide.ropensci.org/building.html)

egenn commented 9 months ago

Before reading roxygen's docs, I thought #' @keywords internal would stop docs from being rendered, instead of just excluding from documentation index.

HenrikBengtsson commented 9 months ago

Should I add #' @noRd to all #' @keywords internal functions?

I'm pretty sure it's only needed for non-exported functions. Note that #' @keywords internal has nothing to do with a function being exported or not; it just declares that the function/object should not be listed in the HTML help index.