I tried several combinations of the solutions given in those threads but to no avail.
Maybe you may help if I share an example. I want to document the methods for [ operation generic. So my question is: what should be the roxygen2 tags for these 3 methods?
#' @export
setMethod("[",
signature(x = "studies", i = "missing", j = "missing", drop = "missing"),
definition = function(x) x)
#' @export
setMethod("[",
signature(x = "studies", i = "numeric", j = "missing", drop = "missing"),
definition = function(x, i) {
study_ids <- unique(x@studies$study_id)[i]
filter_by_id(x, id = study_ids)
})
#' @export
setMethod("[",
signature(x = "studies", i = "character", j = "missing", drop = "missing"),
definition = function(x, i) {
filter_by_id(x, id = i)
})