useDynLib(clustGLMM, .registration=TRUE, .fixes = "C_")

export("as_coda",
       "clustGLMM", 
       "clustering_probabilities_and_deviance", 
       "default_param",
       "default_save",
       "default_tuning",
       "default_varying",
       "from_C_to_list", 
       "from_C_to_matrix", 
       "from_list_to_C",
       "from_list_to_coda",
       "from_list_to_matrix", 
       "from_matrix_to_C", 
       "from_matrix_to_coda",
       "from_matrix_to_list",
       "generate_longitudinal_mixed_type_data",
       "get_scalar_samples", 
       "get_sd_num",
       "get_Sigma",
       "nice_nrow_ncol", 
       "permute_cluster_labels", 
       "plot_ACF", 
       "plot_ACF_param",
       "plot_diagnostics",
       "plot_cat_vs_x_grouped", 
       "plot_clusters", 
       "plot_clusters_ECDF_param",
       "plot_clusters_kerneldensity_param",
       "plot_ECDF", 
       "plot_ECDF_param", 
       "plot_kerneldensity", 
       "plot_kerneldensity_param",
       "plot_ng_trace_chain_split",
       "plot_num_vs_x_grouped", 
       "plot_traceplots", 
       "plot_traceplots_param", 
       "post_processing",
       "rescale_matrix",
       "rescale_list",
       "slategray.colors",
       "slategrey.colors")

S3method(summary, clustglmm)
S3method(predict, clustglmm)
S3method(print, clustglmm)
S3method(plot, clustglmm)
S3method(print, summary.clustglmm)

importFrom("coda", "as.mcmc.list", "mcmc")
importFrom("colorspace", "diverge_hcl", "rainbow_hcl")
importFrom("gaussquad", "hermite.he.quadrature.rules")
importFrom("grDevices", "col2rgb", "grey.colors", "rgb")
importFrom("graphics", "abline", "axis", "boxplot", "legend", "lines", "mtext",
           "par", "points", "rect", "segments", "text")
importFrom("HDInterval", "hdi")
importFrom("MASS", "polr")
importFrom("methods", "is")
importFrom("mvtnorm", "rmvnorm")
importFrom("nnet", "multinom")
importFrom("RcppHungarian", "HungarianSolver")
importFrom("splines", "bs")
importFrom("stats", "acf", "as.formula", "binomial", "coef", "density", "ecdf",
           "lm.fit", "glm", "kmeans", "lowess", "loess.smooth", "median",
           "model.matrix", "na.pass", "plogis", "poisson", "quantile", "rbinom",
           "residuals", "rgamma", "rnorm", "rpois", "runif", "sd")
importFrom("utils", "head")
