useDynLib(rstan, .registration = TRUE)
# exportPattern("^[[:alpha:]]+")

importFrom("graphics", "hist", "lines", "mtext", "par", "points", "rect", "segments", "smoothScatter", "strheight", "strwidth", "text")
importFrom("grDevices", "devAskNewPage", "rgb")
importFrom("stats", "acf", "median", "optimHess", "quantile", "sd", "var")
importFrom("utils", "apropos", "menu", "object.size", "packageDescription", "packageVersion", "relist", "select.list", "unzip")

importFrom("stats4", summary, plot)
importFrom("inline", cxxfunction, getDynLib, getPlugin)
import("methods")
import(Rcpp)

export(
  stan_model,
  stanc, 
  stan_version, 
  stan,
  stan_rdump,
  read_rdump,
  makeconf_path,
  sflist2stanfit,
  read_stan_csv,
  monitor,
  lookup,
  expose_stan_functions,
  stan_demo,
  rstan_options,
  As.mcmc.list,
  set_cppo
# get_rstan.options
)

exportClasses(
  stanmodel, stanfit 
) 
exportMethods(
#   print, plot, 
#   extract, 
  optimizing,
  get_cppcode, get_cxxflags, # for stanmodel 
  show, sampling, summary, extract,
  traceplot, plot, get_stancode, get_inits, get_seed, get_cppo_mode,
  log_prob, grad_log_prob, 
  unconstrain_pars, constrain_pars, get_num_upars,
  get_seeds,
  get_adaptation_info,
  get_sampler_params,
  get_logposterior, 
  get_posterior_mean,
  get_elapsed_time,
  get_stanmodel
)
S3method(print, stanfit)
S3method(as.array, stanfit)
S3method(as.matrix, stanfit)
S3method(as.data.frame, stanfit)
S3method(is.array, stanfit)
S3method(dim, stanfit)
S3method(dimnames, stanfit)
S3method(names, stanfit)
S3method(`names<-`, stanfit)
S3method(pairs, stanfit)
