import(Rcpp)
import(foreach)
import(parallel)
import(Matrix)
importFrom("stats", "as.formula", "binomial", "dbeta", "glm", "model.frame",
"model.matrix", "na.omit", "na.pass", "pchisq", "dchisq", "qchisq", "var",
"pnorm", "uniroot", "integrate", "weights", "vcov")
importFrom("utils", "read.table", "write.table", "txtProgressBar",
"setTxtProgressBar")
if(tools:::.OStype() == "windows") importFrom("utils", "winProgressBar", "setWinProgressBar")
importFrom("CompQuadForm", "davies", "liu")
importFrom("methods", "as")
importFrom("data.table", "fread")

useDynLib(GMMAT, .registration = TRUE, .fixes = "C_")

# functions
export(glmmkin, glmm.score, glmm.wald, glmm.score.meta, SMMAT, SMMAT.prep, SMMAT.lowmem, SMMAT.meta)
