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
#196 was closed as a "duplicate" of #388 and I was very excited when the latter was closed and released with v7.0.0. Unfortunately, even with v7.0.0, base reference classes method documentation tags all get clumped together into single sections.
#' Reference Class Representing a Dog#'#' @description#' A dog has a name and a hair color.#'#' @details#' A dog can also greet you.Dog<- setRefClass(
"Dog",
fields=list(
#' @field name First or full name of the dogname="character",
#' @field hair Hair color of the doghair="character"
),
methods=list(
#' @description#' Create a new dog object.#' @param name Name.#' @param hair Hair color.#' @return A new `Dog` object.initialize=function(name=NA_character_, hair=NA_character_) {
.self$name<-name.self$hair<-hair.self$greet()
},
#' @description#' Change hair color.#' @param val New hair color.#' @return The old hair color, invisibly.#' @examples#' d <- Dog("Rover", "black")#' d$hair#' d$set_hair("red")#' d$hairset_hair=function(val) {
old<-.self$hair.self$hair<-valinvisible(old)
},
#' @description#' Say hi.greet=function() {
cat(paste0("Woof, my name is ", .self$name, ".\n"))
}
)
)
Renders this:
Is there any plan to port the R6 functionality over to RC? Given the high similarity between RC and R6, would it be too wishful to assume that this wouldn't be much more lift? Or - is there just something I'm missing to get it to work already?
The text was updated successfully, but these errors were encountered:
Thanks! Sorry for the misleading issue references.
As we are not using RC classes actively, and RC support seems to be rather involved, ideally this would go into its own roxygen2 extension package, maintained by someone else.
We'll come back to this the next time we work on roxygen2, probably is 1-2 months.
#196 was closed as a "duplicate" of #388 and I was very excited when the latter was closed and released with v7.0.0. Unfortunately, even with v7.0.0, base reference classes method documentation tags all get clumped together into single sections.
Modifying the example from https://roxygen2.r-lib.org/articles/rd.html#r6 slightly:
Renders this:
Is there any plan to port the R6 functionality over to RC? Given the high similarity between RC and R6, would it be too wishful to assume that this wouldn't be much more lift? Or - is there just something I'm missing to get it to work already?
The text was updated successfully, but these errors were encountered: