import(plyr, grid, colorspace, ggplot2, TSP, hexbin, scales, data.table)

## useDynLib(extremis, .registration = TRUE)

importMethodsFrom(Matrix, diag, format, mean, rowMeans, solve, summary,
facet_grid, geom_rect, ggplot, labs, layer, opts,
importFrom(plyr, ., ddply, dlply, empty, idata.frame, laply, ldply, llply)

importFrom("stats", "predict", "AIC", "anova", "aov", "coef", "contrasts",
"contrasts<-", "cor", "cor.test", "density", "fitted",
"formula", "gaussian", "lm", "median", "model.frame",
"model.matrix", "pchisq", "pf", "qt", "quantile", "sd",
importFrom(ggplot2, aes_string, element_blank, element_rect, facet_grid,
geom_rect, ggplot, labs, layer, scale_fill_gradient, scale_size,

export(loess.ancova, loess.as, T.L2, T.aov, T.var, plot.fANCOVA, wild.boot)

importFrom("graphics", grid, mtext, par, polygon, title)
importFrom("stats", ARMAacf, Box.test, acf, ar, arima,
as.formula, diffinv, fft, lm.fit, ls.print,
lsfit, model.frame, na.pass, pnorm, predict,
printCoefmat, qnorm, qqline, qqnorm, rexp,

# Only importing what we need from "sn" since it exports a function

importFrom("grDevices", cm.colors, palette, rainbow, rgb, xy.coords)
importFrom("graphics", Axis, arrows, axis, box, boxplot, grid, hist, image, legend,
mtext, pairs, par, plot.xy, polygon, rect, segments, stars, strwidth, text, title)
importFrom("stats", approx, as.dist, cor, cor.test, cov, cov2cor, density, dist,
dnorm, hclust, kmeans, lowess, mad, mahalanobis, pchisq, qchisq, qf, runif,

## FIXME: use importFrom() for the larger packages!
## For backcompatibility: people expect to find these in fBasics;

#fCouplae, fExtremes, fGarch, fMultivar and fRegression need a lot of exported
#functions that start with a dot. This has to be fixed first...

importFrom("graphics", axis, barplot, box, boxplot, contour,
grid, hist, layout, locator, matplot, mtext,
panel.smooth, par, persp, pie, plot.new,
plot.window, polygon, rect, rug, symbols, text,
importFrom("stats", acf, ansari.test, approx, ar, arima,
density, dnorm, dt, integrate, ks.test, lsfit,
median, model.matrix, model.response, nlm, nlminb,
numericDeriv, optim, optimize, pacf, pchisq, pf,
pnorm, ppoints, qchisq, qf, qnorm, qqline,
qqnorm, qt, residuals, rexp, rnorm, runif, sd,
shapiro.test, spline, t.test, uniroot, var)
importFrom("methods", getMethod, is, new, slot)
## 'akima' is *not* here because of its non-GPL Licence
## (MM:) FIXME: Only import what you need!