exportPattern("^[[:alpha:]]+")
importFrom("blackbox", 
           # 'current:
           "as.surface", # called by for plot functions so presumably required irrespective of workflow.
           "init_grid", # called by init_reftable() 
           # next 4 for GCV, so theoretically not only primitive workflow:
           "prepareData", "calcGCV", "blackbox.options", "blackbox.getOption", 
           # All further ones only for primitive workflow: 
           "resetCHull", # (up to date workflow uses convhulln instead of resetCHull)
           "locatePointinvT", "volTriangulationWrapper", "isPointInCHull", "subHullWrapper",   
           "volTriangulation", "rvolTriangulation", "subsimplices.volTriangulation","rsimplex")
importFrom("graphics", "abline", "axis", "curve", "filled.contour", "lines", "par", "plot", "points", "plot.new", "text", "title",
           "dotchart")
importFrom("geometry", "convhulln")
importFrom("grDevices", "adjustcolor")
importFrom("methods", "slot", "new")
importFrom("mvtnorm", "dmvnorm", "rmvnorm", "rmvt")
importFrom("ranger", "ranger", "importance")
importFrom("numDeriv", "grad", "hessian", "jacobian")
importFrom("pbapply", "pblapply", "pboptions", "pbreplicate", "pbsapply")
importFrom("proxy", "dist")
#importFrom("Rmixmod", "mixmodCluster", "mixmodStrategy", "mixmodGaussianModel", "plotCluster")
importFrom("spaMM", "fitme", 
                    "spaMM.colors", # still used for dot plots
                    "fixef", # some non-essential uses
                    "mapMM", # old workflow...
                    "filled.mapMM", # plot.Slik() (vs : plot.SLik_j() use .filled.contour.plot() -> spaMM.filled.contour ) 
                    "spaMM.filled.contour", # several uses incl. plot.SLik_j()
                    "spaMMplot2D", # in plot.SLik_j()
                    "combinepar", # for 2D profiles. Its the main way this function is used anywhere.
                    "regularize", # used
                    "get_ranPars" # several non-essential roles
           ) ## doc'ed fns
importFrom("spaMM", "makeTicks", ".safe_opt") ## undoc fns
importFrom("stats", "deviance", "glm", "var", "as.formula", "cov", "dnorm", "fitted", "optim", "pchisq", "pnorm", "quantile",
           "predict", "qchisq", "runif", "uniroot", "binomial", "poisson", "constrOptim", "dchisq", "profile", "confint", "rnorm", 
           "Gamma", "pgamma", ## for the optional gamma-based LRT correcction, so might be removed later
           "na.omit", "model.frame", "setNames", "nlminb","median", "qnorm", "ecdf", "simulate")
importFrom("utils", "packageVersion", "setTxtProgressBar", "txtProgressBar", "packageDescription", "getS3method", "capture.output", 
           "head", "combn","tail", "str")
importFrom("boot", "boot.ci")
importFrom("nloptr", "nloptr")
#importFrom("mclust", "Mclust", "densityMclust", "mclustBIC", "sim") ## mclustBIC bc Mclust() -> as.name("mclustBIC") but many more pop up...
export(mapMM) ## from spaMM
export(resetCHull,isPointInCHull) ## from blackbox
export(init_grid) # from blackbox, doc'ed in Infusion itself as it is explicitly used in doc 

S3method(profile, SLik)
S3method(profile, SLik_j)
S3method(plot, SLik)
S3method(print, SLik)
S3method(print, SLik_j)
S3method(summary, SLik)
S3method(summary, SLik_j)
S3method(print, logLs)
S3method(summary, logLs)
S3method(print, goftest)
S3method(summary, goftest)
S3method(plot, SLikp)
S3method(plot, SLik_j)
S3method(plot,MixmodResults)
S3method(plot, dMixmod)
S3method(print, SLikp)
S3method(summary, SLikp)
S3method(logLik,SLik)
S3method(logLik,SLik_j)
S3method(confint,SLik)
S3method(confint,SLik_j)
S3method(confint,SLikp)
S3method(predict,SLik)
S3method(predict,SLik_j)
S3method(predict,SLikp)
S3method(predict,dMixmod)
S3method(predict,MixmodResults)
S3method(predict,dMclust)
# S3method(predict,gllim)
S3method(project,default)
S3method(project,character)
S3method(refine,SLik)
S3method(refine,SLik_j)
S3method(refine,SLikp)
S3method(refine,default)
S3method(summLik,SLik_j)
S3method(summLik,default)
S3method(simulate, SLik_j)
S3method(infer_surface,logLs)
S3method(infer_surface,tailp)
S3method(calc.lrthreshold,SLik)
S3method(calc.lrthreshold,SLikp)
S3method(calc.lrthreshold,default)
S3method(get_from, SLik)
S3method(get_from, SLik_j)
S3method(get_from, default)
S3method("[", reftable)
S3method(str, MAF)
