Ignoring the documentation of non-exported, inherited classes

I have a child R6Class inheriting a parent class that only has a few private methods, a public property and an initialize method. The child class also has an initialize method that adds a couple of functionalities to the inherited one. In the end, the documentation of the parent initialize is essentially a duplicate of the child one (minus the extra params). I only export the child class.

E.g.:

ParentClass <- R6Class(
  "ParentClass",
  public = list(
    property = NULL,
    initialize = function(x) {
      self$property <- x
    }
  ),
  private = list(
    # more methods here
  )
)

#' @description ParentClass
#' @export
ChildClass <- R6Class(
  "ChildClass",
  inherit = ParentClass,
  public = list(
    #' @field A property
    property2 = NULL,

    #' @description Create a `ParentClass` object.
    #' @param x Description of param x.
    #' @param y Description of param y.
    initialize = function(x, y) {
      super$initialize(x)
      self$property2 <- y
    },
    
    # more public methods
  )
)

What's the correct approach when documenting such classes? I'd like to ignore the parent class documentation which is mostly repetitive and not informative for external users but devtools asks me to document the parent class as well. Is there a way to tell devtools to simply ignore the parent class when building the doc?

As long as the output is good (and R CMD check is fine if you want to submit your package to CRAN), you can safely ignore the devtools warning.

Perfect, what I wanted to know. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.