R/plot.sm.bayesx.R

Defines functions plot.sm.bayesx

plot.sm.bayesx <- function(x, diagnostics = FALSE, ...)
{
  if(!is.null(x)) {
    args <- list(...)
    args$x <- x
    if(diagnostics == FALSE) {
      if(attr(x, "specs")$dim == 1L)
        plottype <- "plot2d"
      else {
        plottype <- if(is.null(args$sliceplot)) "plot3d" else "sliceplot"
      }
      do.call(plottype, args)
    } else coeffun(x, args, diagnostics)
  } else warning("there is nothing to plot!")

  return(invisible(NULL))
}

Try the R2BayesX package in your browser

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

R2BayesX documentation built on Oct. 20, 2023, 3:01 p.m.