In a new package I am developing, I need to use an unexported function(survmean) from Survival package.
#' @importFrom does not work and other alternative are not the best practices for putting the package in CRAN: borrowedfun <- pkg:::fun()
fun <- utils::getFromNamespace("fun", "pkg")
I am thinking of copying the source of the package and citing the original package. I can't find a documentation of citing/referencing the other package. How do I properly cite when I borrow the source of an internal function of someone else's package.