import(splines)
import(MASS)
import(nlme)
importFrom("grDevices", "grey","adjustcolor","colorRampPalette")
importFrom("graphics", "abline", "axis", "box", "lines", "matlines",
             "matplot", "par", "plot", "points", "polygon", "segments","smoothScatter",
           "legend","mtext")
importFrom("stats", "approx", "as.formula", "coef", "contrasts", "family",
             "fitted", "formula", "gaussian", "glm.control", "glm.fit",
             "is.empty.model", "lm.wfit", "median", "model.frame",
             "model.matrix", "model.offset", "model.response",
             "model.weights", "na.omit", "pnorm", "predict",
             "printCoefmat", "pt", "qnorm", "qt", "quantile", "resid",
             "residuals", "runif", "summary.glm", "summary.lm", "update",
             "update.formula", "vcov", "weights", "dnorm", "lm", "lm.fit", "splinefun",
             "complete.cases","sd","qchisq","pchisq","BIC","get_all_vars", "optimize", 
             "terms","is.ts", "tsp", "AIC",".lm.fit","var",
	           "asOneSidedFormula", "logLik","plogis")
importFrom("utils", "flush.console")

export(segmented, segmented.default, segmented.lm, segmented.glm, segmented.Arima, segmented.numeric, 
	segmented.lme, print.segmented.lme, summary.segmented.lme, vcov.segmented.lme, confint.segmented.lme, 
	logLik.segmented.lme, fixef.segmented.lme, fitted.segmented.lme, plot.segmented.lme,
	broken.line ,confint.segmented,davies.test,pscore.test,draw.history,aapc,
	intercept,lines.segmented,plot.segmented,print.segmented, coef.segmented,
	seg.control,seg.lm.fit,seg.glm.fit,seg.lm.fit.boot,seg.glm.fit.boot,
	seg.def.fit,seg.def.fit.boot, seg.Ar.fit,seg.Ar.fit.boot,
	seg.num.fit, seg.num.fit.boot,
	slope, summary.segmented,print.summary.segmented,vcov.segmented, predict.segmented, 
	points.segmented, aapc, selgmented, pwr.seg)

S3method(segmented,default)
S3method(segmented,lm)
S3method(segmented,glm)
S3method(segmented,Arima)
S3method(segmented,numeric)
S3method(segmented,lme)
S3method(plot,segmented)
S3method(print,segmented)
S3method(summary,segmented)
S3method(print, summary.segmented)
S3method(lines,segmented)
S3method(confint,segmented)
S3method(vcov,segmented)
S3method(predict,segmented)
S3method(points,segmented)
S3method(coef,segmented)

S3method(print, segmented.lme)
S3method(summary, segmented.lme)
S3method(vcov, segmented.lme)
S3method(confint, segmented.lme)
S3method(logLik, segmented.lme)
S3method(fixef, segmented.lme)
S3method(fitted, segmented.lme)
S3method(plot, segmented.lme)