You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With roxygen2 one can inherit parameters/sections from one function to the other in order to remove duplication of doc sources while still having docs everywhere it's needed. Cf this blog post. I think a function that'd help find duplicates could be useful.
Parse the results a bit more and say stuff like "the parameter BLABLA is documented in functions A, B, C" (and this even if the documentation is different, based on the parameter name rather than the whole line).
Also find lines that are close (in case one has two similar Details section but corrected a typo in only one of them?)
Have a verbose output but also markers?
I also wonder if a similar tool for code lines could be useful but maybe it even already exists? 🤔
The text was updated successfully, but these errors were encountered:
Perhaps the output could also describe how to address duplication, e.g.,
An alternative to @describeIn is @rdname. It overrides the default file name generated by roxygen and merges documentation for multiple objects into one file. This gives you complete freedom to combine documentation however you see fit. There are two ways to use @rdname. You can add documentation to an existing function:
#' Basic arithmetic
#'
#' @param x,y numeric vectors.
add <- function(x, y) x + y
#' @rdname add
times <- function(x, y) x * y
This is a feature request dear @hfrick 🙏 😺
With
roxygen2
one can inherit parameters/sections from one function to the other in order to remove duplication of doc sources while still having docs everywhere it's needed. Cf this blog post. I think a function that'd help find duplicates could be useful.Here is code by @jimhester to find duplicates
He also wrote the
tidyverse
-compliant versionThis already helps a lot. A perfect helper would:
Parse the results a bit more and say stuff like "the parameter BLABLA is documented in functions A, B, C" (and this even if the documentation is different, based on the parameter name rather than the whole line).
Also find lines that are close (in case one has two similar Details section but corrected a typo in only one of them?)
Have a verbose output but also markers?
I also wonder if a similar tool for code lines could be useful but maybe it even already exists? 🤔
The text was updated successfully, but these errors were encountered: