R/extraMethods.R

Defines functions as.data.frame.runjags

# This file contains methods for classes defined in OTHER packages.

# for class 'runjags' from the runjags package

as.data.frame.runjags <- function(x, ...) {
  df <- as.data.frame(as.matrix(as.mcmc.list(x)))
  names(df) <- sub(",", "\\.", sub("\\]", "", sub("\\[", "", names(df))))
  return(invisible(df))
}

Try the wiqid package in your browser

Any scripts or data that you put into this service are public.

wiqid documentation built on Nov. 18, 2022, 1:07 a.m.