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(mmes)

## FUN_special and FUN_vsc and FUN_vsrgvsr
export( unsm, fixm, # small constructors
       atm,csm,dsm,usm,vsm, ism, rrm, covm, ## mmes
       # special functions to create model matrices
       overlay, redmm, 
       add.diallel.vars,
       vpredict,
       # usr, dsr, csr, atr, vcsExtract, reshap.mmer DEPRECATED
       mmer, vsr, vs, GWAS# mmer DEPRECATED
        
       )

## FUN_spatial
export( spl2Dc,spl2Dmats,bbasis,tpsmmbwrapper, tps)

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

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

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

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

# S3 METHODS mmes
S3method(vpredict, mmes)

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

# 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")

