Hiya,
Say I have an internal (non-exported function) which is documented with examples. A build check will correctly throw errors since has_class isn't exported.
Normally I'd just use :::
but to access internal functions, but i've had packages rejected from cran for these reasons.
I've seen other threads mention @noRd, which seems to be the best solution - but I find it more convenient for package maintenance to have the full roxygen documentation present (you lose features like paramater inheritance with @noRd)
Is there a a solution thats OK for CRAN but lets me document internal functions similarly to exported functions?
#' Check object is some class
#'
#' This function checks whether object is a specific class
#'
#' @param x A value to check.
#' @param class checks if `x` belongs to `class`. If multiple values of `class` are supplied, returns whether `x` belongs to any of them (character)
#' @return A logical scalar indicating `x` belongs to `class`
#' has_class(1, "numeric") # TRUE
#' has_class(1, "character") # FALSE
#'
has_class <- function(x, class){
return(inherits(x, what = class))
}