njtierney / mmcc

Fast, tidy functions for mcmc diagnostics and summaries, built with data.table
http://mmcc.njtierney.com/
Other
24 stars 5 forks source link

Consider creating custom "mmcc" class #39

Open njtierney opened 5 years ago

njtierney commented 5 years ago

I'm creating the n_chain helper function at the moment, and it would be useful to know whether the object is something that was created with mcmc_to_dt so it can be dispatched via S3 methods.

Current method is:

n_chain.data.table <- function(x){
    max(x$chain)
}

New method, if the class structure gets implemented, would be:

n_chain.mmcc <- function(x){
  max(x$chain)
}
samclifford commented 5 years ago

I'm on board.