useDynLib(sommer, .registration=TRUE)
importFrom(Rcpp, evalCpp)
#exportPattern("^[[:alpha:]]+")

export(
       transp,jet.colors,bathy.colors,
      LD.decay,
      manhattan, map.plot,
       dfToMatrix, atcg1234BackTransform
       )

## FUN_main
export(mmer, GWAS, mmec)

## FUN_special and FUN_vsc and FUN_vsrgvsr
export(atr,csr,dsr,usr,vsr, gvsr, vs, ## mmer
       atc,csc,dsc,usc,vsc, isc, rrc, covc, ## mmec
       unsm,fixm,fcm,
       list2usmat, transformConstraints,
       # special functions to create model matrices
       overlay, redmm, 
       add.diallel.vars, stackTrait,
       bivariateRun, vpredict)

## FUN_spatial
export( spl2Da,spl2Db, spl2Dc,spl2Dmats,bbasis,tpsmmbwrapper)

## FUN_markers
export(atcg1234,build.HMM, neMarker)

## FUN_stats
export(adiag1, imputev, propMissing, logspace,
       leg, wald.test, corImputation,
       r2
       )

## FUN_relationships
export(A.mat, D.mat, E.mat, H.mat, AR1, CS, ARMA, simGECorMat)

## FUN_algorithms
export(EM, MEMMA, AI)

## FUN_utils
export( # mmer
       summary.mmer, residuals.mmer, fitted.mmer, coef.mmer,
       anova.mmer, plot.mmer, predict.mmer, vpredict.mmer,
        # mmec
       summary.mmec, residuals.mmec, fitted.mmec, coef.mmec,
       anova.mmec, plot.mmec, predict.mmec, pmonitor,
        # others
       randef)

# S3 METHODS mmer
S3method(anova, mmer)
S3method(coef, mmer)
S3method(fitted, mmer)
S3method(plot, mmer)
S3method(predict, mmer)
S3method(print, predict.mmer)
S3method(print, residuals.mmer)
S3method(print, fitted.mmer)
S3method(print, coef.mmer)
S3method(print, summary.mmer)
S3method(residuals, mmer)
S3method(summary, mmer)
S3method(vpredict, mmer)

# S3 METHODS mmec
S3method(anova, mmec)
S3method(coef, mmec)
S3method(fitted, mmec)
S3method(plot, mmec)
S3method(predict, mmec)
S3method(print, predict.mmec)
S3method(print, residuals.mmec)
S3method(print, fitted.mmec)
S3method(print, coef.mmec)
S3method(print, summary.mmec)
S3method(residuals, mmec)
S3method(summary, mmec)

# S3 METHODS other
S3method(print, wald.test)

###########
## full imports
###########
  import("methods")
  import("Matrix")
  import("MASS")
  import("crayon")
 # import("data.table")
  # import("lattice")
############
# IMPORTS
############
  importFrom("graphics", "abline", "axis", "layout", "legend",
             "lines", "plot", "points", "rect", "text", "locator",
             "par", "grid", "plot.new", "polygon","segments", "title")
  importFrom("utils", "combn", "setTxtProgressBar", "txtProgressBar",
             "available.packages", "contrib.url","str")
  importFrom("methods", "as")
#  importFrom("crayon", "blue")

### extra suggested by CRAN
  importFrom("grDevices", "col2rgb", "colorRampPalette", "gray.colors",
             "rgb","dev.cur", "dev.size", "xy.coords", "topo.colors")
  importFrom("stats", "reformulate", "as.formula", "cov", "density", "gaussian", "glm",
             "lm", "median", "optimize", "pbeta", "pchisq","pnorm", "predict",
             "printCoefmat", "qqnorm", "smooth.spline", "var", "rnorm",
             "model.matrix","na.omit", "p.adjust","kmeans","dist", "runif",
             "nobs", "ppoints", "sd", "model.frame", "model.response", "na.pass",
             "cor", "optim", "rchisq","quantile","deriv","terms.formula",
             "aggregate","pf","terms", "reshape")
#  importFrom("RcppArmadillo", "fastLm")
#  importFrom("lattice", "wireframe")
#  importFrom("data.table", "setkeyv","data.table")

