# Methods needed from other packages
importFrom(stats, confint, fitted, coef, vcov, predict, update, profile,
           simulate, residuals, logLik, as.formula, binomial, cov, dbinom,
           dmultinom, dnbinom, dnorm, dpois, formula,
           glm.fit, integrate, median, model.frame,
           model.matrix, model.offset, na.omit, optim, pchisq, plogis,
           pnorm, qchisq, qnorm, quantile, rbinom,
           reshape, rmultinom, rnbinom, rpois, runif, sd, uniroot,
           update.formula, sigma)
importFrom(graphics, plot, hist, abline, axis, lines, points, polygon, segments, title)
importFrom(utils, head, read.csv)
importFrom(grDevices, devAskNewPage, dev.interactive, palette.colors)
importFrom(MASS, mvrnorm)
importFrom(parallel, detectCores, makeCluster, stopCluster, clusterExport,
           clusterEvalQ)
importFrom(methods, is, as, new, show, slot, .hasSlot, callGeneric, 
           callNextMethod, setMethod)
importFrom(lattice, xyplot, levelplot)
importFrom(Rcpp, evalCpp)


# Fitting functions
export(occu, occuFP, occuRN, pcount, pcountOpen, multinomPois, distsamp,
       colext, gmultmix, gdistsamp, gpcount, occuPEN, occuPEN_CV, occuMulti,
       occuMS, computeMPLElambda, pcount.spHDS, occuTTD, distsampOpen,
       multmixOpen, nmixTTD, gdistremoval, goccu, occuCOP, IDS, occuComm)

export(removalPiFun, doublePiFun)
export(makeRemPiFun, makeCrPiFun, makeCrPiFunMb, makeCrPiFunMh)

# Classes
exportClasses(unmarkedFit, unmarkedFrame)

# Methods
exportMethods(backTransform, coef, confint, fitted, getData,
              getP, getFP, getB, getY, head, linearComb, LRT,
              modSel, numSites, numY, obsCovs, obsNum, "obsCovs<-",
              obsToY, "obsToY<-", parboot, plot, hist, predict, profile,
              residuals, sampleSize, SE, simulate, siteCovs,
              "siteCovs<-", summary, update, vcov, yearlySiteCovs,
              "yearlySiteCovs<-", "[", smoothed, projected, nonparboot, logLik,
              ranef, bup, crossVal, posteriorSamples, sigma, randomTerms, 
              optimizePenalty, unmarkedPowerList, plotEffectsData, plotEffects,
              getL, richness)

S3method("print", "unmarkedPostSamples")

# Constructors
export(fitList,
    unmarkedFrameOccu, unmarkedFrameOccuFP, unmarkedFramePCount, unmarkedFrameMPois,
    unmarkedFrameDS, unmarkedMultFrame, unmarkedFrameGMM,
    unmarkedFramePCO, unmarkedFrameGDS, unmarkedFrameGPC, unmarkedFrameOccuMulti,
    unmarkedFrameOccuMS, unmarkedFrameOccuTTD, unmarkedFrameDSO, 
    unmarkedFrameMMO, unmarkedFrameGDR, unmarkedFrameGOccu,
    unmarkedFrameOccuCOP, unmarkedFrameOccuComm)

# Formatting
export(csvToUMF, formatLong, formatWide, formatMult, formatDistData)

# Misc
export(gxhn, gxexp, gxhaz, dxhn, dxexp, dxhaz, drhn, drexp,
    drhaz, grhn, grexp, grhaz, lambda2psi, SSE, vif, powerAnalysis)

# Removed functions
export(shinyPower)

useDynLib("unmarked", .registration=TRUE)
useDynLib(unmarked_TMBExports)
