All the functions used within the family (i.e., within the loglikelihood, Jacobian etc) need to be properly exported. Otherwise, to avoid polluting the namespace, one can define a "master" internal function as done in the SCM package:
#' A pool of internal functions used by the family (please do not modify this function)
#'
#' @description Such function masks some functions used internally
#'
#' @return a list of building functions
#' @export
internal <- function(){
return(list(# Common functions (between mcd and logm):
"gamlss.gH_scm" = gamlss.gH_scm,
"mat2vec" = mat2vec,
"pred_logm" = pred_logm,
"jacobian_logm" = jacobian_logm,
"logM_Sigma" = logM_Sigma))
}
So here only internal() is exported.
Then in the family, one would call internal$mat2vec(some_arguments).
All the functions used within the family (i.e., within the loglikelihood, Jacobian etc) need to be properly exported. Otherwise, to avoid polluting the namespace, one can define a "master" internal function as done in the SCM package:
So here only internal() is exported. Then in the family, one would call
internal$mat2vec(some_arguments)
.