# load shared objects; registration is via src/init.c file; the names of the
# registered symbols have prefix "C_" such that they are easily recognizable
useDynLib(robsurvey, .registration = TRUE, .fixes = "C_")

# import
importFrom("grDevices", as.graphicsAnnot, dev.flush, dev.hold,
    dev.interactive, devAskNewPage, extendrange, xy.coords)
importFrom("graphics", abline, mtext, panel.smooth, par, points,
    strheight, text, title, plot)
importFrom("stats", fitted, qqnorm, residuals, printCoefmat, pt, qt,
    setNames, optim, complete.cases, model.frame, model.matrix, coef,
    model.response, na.pass, terms, terms.formula, as.formula, weights)
importFrom("KernSmooth", dpik, locpoly)
importFrom("utils", packageVersion)
importFrom("survey", svyrecvar)

# export
S3method(print,svystat_rob)
S3method(print,svyreg_rob)

export(svysummary)

S3method(summary,svystat_rob)
S3method(summary,svyreg_rob)

S3method(coef,svystat_rob)
S3method(coef,svyreg_rob)

S3method(vcov,svystat_rob)
S3method(vcov,svyreg_rob)

S3method(fitted,svystat_rob)
S3method(fitted,svyreg_rob)

S3method(residuals,svystat_rob)
S3method(residuals,svyreg_rob)

export(robweights)
S3method(robweights,svystat_rob)
S3method(robweights,svyreg_rob)

export(SE.svystat_rob)
export(SE.svyreg_rob)

S3method(plot,svyreg_rob)

S3method(scale,svystat_rob)

S3method(confint,svystat_rob)

export(huber2)

export(tukeyWgt)
export(huberWgt)

export(svymean_huber)
export(svymean_k_winsorized)
export(svymean_trimmed)
export(svymean_tukey)
export(svymean_winsorized)
export(svymean_dalen)

export(svymean_reg)
export(svytotal_reg)

export(svymean_ratio)
export(svytotal_ratio)

export(svytotal_huber)
export(svytotal_k_winsorized)
export(svytotal_trimmed)
export(svytotal_tukey)
export(svytotal_winsorized)
export(svytotal_dalen)

export(svyreg)
export(svyreg_control)

export(svyreg_huber)
export(svyreg_huberM)
export(svyreg_huberGM)

export(svyreg_tukey)
export(svyreg_tukeyM)
export(svyreg_tukeyGM)

export(svyratio_huber)
export(svyratio_tukey)

export(weighted_IQR)
export(weighted_line)
export(weighted_mad)

export(within_tolerance)

export(weighted_mean)
export(weighted_mean_dalen)
export(weighted_mean_huber)
export(weighted_mean_k_winsorized)
export(weighted_mean_trimmed)
export(weighted_mean_tukey)
export(weighted_mean_winsorized)

export(weighted_median)
export(weighted_median_line)
export(weighted_median_ratio)
S3method(print,medline)
S3method(coef,medline)
S3method(residuals,medline)
S3method(fitted,medline)

export(weighted_quantile)

export(weighted_total)
export(weighted_total_dalen)
export(weighted_total_huber)
export(weighted_total_k_winsorized)
export(weighted_total_trimmed)
export(weighted_total_tukey)
export(weighted_total_winsorized)

export(mer)

export(mse)
S3method(mse,svystat_rob)
S3method(mse,svystat)

export(simpsonWgt)

export(pps_probabilities)
export(pps_draw)
S3method(print,prob_pps)
