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


export(
       dfToMatrix
       )

## FUN_main
export(mmes, MNR)

## FUN_special and FUN_vsc and FUN_vsrgvsr
export( unsm, unsm2, fixm, # small constructors
       atm,csm,dsm,usm,vsm, ism, covm, ## mmes
       # special functions to create model matrices
       vpredict,
       usr, dsr, csr, atr, # DEPRECATED
       mmer, vsr, vs, GWAS# mmer DEPRECATED
        
       )

## FUN_spatial
export( spl2Dc,spl2Dmats,tpsmmbwrapper)

## FUN_stats
export( 
       corImputation,
       r2
       )

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

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



###########
## full imports
###########
  import("methods")
  import("Matrix")
  import("MASS")
  import("crayon")
  import("enhancer")
############
# 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")


