
# import
import(
    bayesTFR, hett, coda, wpp2019, data.table
)
importFrom(car, dataEllipse)
importFrom("graphics", "abline", "grid", "legend", "lines", "plot", "points", "text")
importFrom("grDevices", "rainbow")
importFrom("stats", "dgamma", "dnorm", "dunif", "median", "pnorm", "quantile", "rexp", "rgamma", 
           "rnorm", "rt", "runif", "sd", "C", "approxfun", "lowess", "na.omit")
importFrom("utils", "modifyList", "data")
           
#exportPattern("^[[:alpha:]]+")
useDynLib(bayesLife, .registration = TRUE)

# export functions
export(
	run.e0.mcmc,
	continue.e0.mcmc,
	run.e0.mcmc.extra,
	e0.predict,
	e0.predict.extra,
	e0.median.shift,
	e0.median.set,
	e0.median.reset,
	e0.median.adjust.jmale,
	e0.shift.prediction.to.wpp,
	get.e0.shift,
	convert.e0.trajectories,
	write.e0.projection.summary,
	get.e0.mcmc,
	has.e0.mcmc,
	e0.mcmc,
	e0.mcmc.list,
	get.thinned.e0.mcmc,
	create.thinned.e0.mcmc,
	get.e0.prediction,
	has.e0.prediction,
	available.e0.predictions,
	get.e0.jmale.prediction,
	has.e0.jmale.prediction,
	get.rege0.prediction,
	get.e0.convergence.all,
	get.e0.convergence,
	e0.dl.coverage,
	e0.parameter.names.extended,
	e0.parameter.names.cs.extended,
	e0.parameter.names,
	e0.parameter.names.cs,
	get.e0.parameter.traces,
	get.e0.parameter.traces.cs,
	get.e0.trajectories,
	e0.coda.list.mcmc,
	e0.DLcurve.plot.all,
	e0.DLcurve.plot,
	e0.get.dlcurves,
	e0.world.dlcurves,
	e0.country.dlcurves,
	e0.parDL.plot,
	e0.DLisDecrement,
	e0.trajectories.table,
	e0.trajectories.plot.all,
	e0.trajectories.plot,
	e0.partraces.plot,
	e0.partraces.cs.plot,
	e0.pardensity.plot,
	e0.pardensity.cs.plot,
	get.e0.map.parameters,
	e0.map.all,
	e0.map,
	e0.ggmap,
	e0.map.gvis,
	e0.raftery.diag,
	e0.diagnose,
	store.bayesLife.convergence,
	store.bayesLife.prediction,
	e0.jmale.estimate,
	e0.jmale.predict,
	e0.predict.subnat,
	e0.jmale.predict.subnat,
	subnat.gap.estimates,
	e0.gap.plot,
	e0.gap.plot.all,
	e0.joint.plot,
	e0.joint.plot.all,
	e0options,
	e0mcmc.options,
	e0pred.options,
	e0mcmc.dlpriors.options,
	get.DLpriors,
	compute.loess,
	compute.residuals,
	using.bayesLife
)

# register S3 methods
S3method(bdem.parameter.traces, bayesLife.mcmc)

S3method(get.mcmc.list, bayesLife.mcmc.set)
S3method(get.mcmc.list, bayesLife.mcmc)
S3method(get.mcmc.list, bayesLife.prediction)

S3method(get.mcmc.meta, bayesLife.mcmc.meta)
S3method(get.mcmc.meta, bayesLife.mcmc.set)
S3method(get.mcmc.meta, bayesLife.mcmc)
S3method(get.mcmc.meta, bayesLife.prediction)

S3method(coda.mcmc, bayesLife.mcmc)

S3method(summary, bayesLife.mcmc.set)
S3method(summary, bayesLife.mcmc.meta)
S3method(summary, bayesLife.mcmc)
S3method(summary, bayesLife.prediction)
S3method(summary, bayesLife.convergence)

S3method(print, bayesLife.mcmc)
S3method(print, bayesLife.mcmc.set)
S3method(print, bayesLife.mcmc.meta)
S3method(print, bayesLife.prediction)
S3method(print, summary.bayesLife.prediction)
S3method(print, summary.bayesLife.mcmc.meta)
S3method(print, summary.bayesLife.mcmc.set)
S3method(print, summary.bayesLife.mcmc)

S3method(get.traj.ascii.header, bayesLife.mcmc.meta)
S3method(get.nr.countries, bayesLife.mcmc.meta)
S3method(get.nrest.countries, bayesLife.mcmc.meta)
S3method(get.data.matrix, bayesLife.mcmc.meta)
S3method(get.countries.index, bayesLife.mcmc.meta)

S3method(get.data.imputed, bayesLife.prediction)
S3method(get.data.for.country.imputed, bayesLife.prediction)
S3method(get.projection.summary.header, bayesLife.prediction)
S3method(get.UN.variant.names, bayesLife.prediction)
S3method(get.friendly.variant.names, bayesLife.prediction)
S3method(.get.gamma.pars, bayesLife.prediction)
S3method(.map.main.default, bayesLife.prediction)
S3method(bdem.map.gvis, bayesLife.prediction)
S3method(par.names.for.worldmap, bayesLife.prediction)
S3method(get.data.for.worldmap, bayesLife.prediction)
S3method(get.countries.table, bayesLife.prediction)
S3method(get.countries.table, bayesLife.mcmc.set)
