useDynLib(BayesFactor)

export(logMeanExpLogs,
    logCumMeanExpLogs,
    BFInfo,
    ttest.tstat,
    oneWayAOV.Fstat,
    linearReg.R2stat,
    nWayAOV,
    ttestBF,
    lmBF,
    regressionBF,
    anovaBF,
    BFManual,
    as.BFBayesFactor,
    as.BFprobability,
    generalTestBF,
    meta.ttestBF,
    proportionBF,
    contingencyTableBF,
    enumerateGeneralModels,
    logSummaryStats,
    newPriorOdds,
    "priorOdds<-",
    "priorLogodds<-",
    correlationBF)

importFrom(methods, show)
importFrom(utils, head)
importFrom(utils, tail)
importFrom(graphics, plot)
importFrom(utils, packageDescription)
importFrom(Rcpp, evalCpp)
importFrom(MatrixModels, model.Matrix)
import(mvtnorm, pbapply, stringr, coda, Matrix)

importFrom("graphics", "abline", "axis", "barplot", "par", "segments",
            "text")
importFrom("methods", ".hasSlot", "S3Part", "S3Part<-", "as", "is",
            "new", "slot", "slot<-", "slotNames")
importFrom("stats", "aov", "dbinom", "dnorm", "dt", "formula",
            "integrate", "lm", "nlm", "optim", "pcauchy", "plogis",
            "pt", "qlogis", "rgamma", "sd", "t.test", "terms", "var", "dlogis")
importFrom("utils", "combn", "setTxtProgressBar", "txtProgressBar",
            "vignette")
importFrom("stats", "cor", "dbeta", "pbeta", "pnorm")

exportClasses("BFmodel", "BFBayesFactor","BFlinearModel", "BFodds")
exportClasses("BFBayesFactorList", "BFoneSample","BFindepSample","BFcontingencyTable")
exportMethods("extractBF","compare","t","recompute","posterior","which.min","which.max","is.na","model.matrix")
exportMethods("extractOdds", "extractProbabilities","filterBF")

S3method("is.na","BFBayesFactor")
S3method("c","BFBayesFactor")
S3method("plot","BFBayesFactor")
S3method("head","BFBayesFactor")
S3method("tail","BFBayesFactor")
S3method("min","BFBayesFactor")
S3method("max","BFBayesFactor")
S3method("which.min","BFBayesFactor")
S3method("which.max","BFBayesFactor")
S3method("sort","BFBayesFactor")
S3method("as.data.frame","BFBayesFactor")
S3method("as.vector","BFBayesFactor")
S3method("names","BFBayesFactor")
S3method("length","BFBayesFactor")
S3method("t","BFBayesFactor")


S3method("as.matrix", "BFBayesFactorList")
S3method("as.vector", "BFBayesFactorList")

S3method("as.mcmc", "BFmcmc")
S3method("as.matrix", "BFmcmc")
S3method("as.data.frame", "BFmcmc")

S3method("as.BFBayesFactor", "BFBayesFactorTop")
S3method("plot","BFBayesFactorTop")
S3method("sort","BFBayesFactorTop")
S3method("length","BFBayesFactorTop")

S3method("as.BFBayesFactor", "BFodds")
S3method("as.BFprobability", "BFodds")
S3method("c","BFodds")
S3method("length","BFodds")
S3method("head","BFodds")
S3method("tail","BFodds")
S3method("min","BFodds")
S3method("max","BFodds")
S3method("which.min","BFodds")
S3method("which.max","BFodds")
S3method("sort","BFodds")
S3method("as.data.frame","BFodds")
S3method("as.vector","BFodds")
S3method("names","BFodds")

S3method("head","BFprobability")
S3method("tail","BFprobability")
S3method("min","BFprobability")
S3method("max","BFprobability")
S3method("which.min","BFprobability")
S3method("which.max","BFprobability")
S3method("sort","BFprobability")
S3method("as.data.frame","BFprobability")
S3method("as.vector","BFprobability")
S3method("names","BFprobability")
S3method("length","BFprobability")
S3method("sum","BFprobability")
