R/read.bayesx.output.R

Defines functions read.bayesx.output

Documented in read.bayesx.output

read.bayesx.output <-
function(dir, model.name = NULL)
{
  if(is.null(dir))
    stop("no directory specified!")
  if(is.null(model.name))
    bm <- search.bayesx.models(dir)
  else
    bm <- model.name
  k <- length(bm)
  rval <- list()
  for(j in 1:k) {
    cmd <- paste("rval$", bm[j], "<-read.bayesx.model.output('", dir, "','", bm[j], "')", sep = "")
    eval(parse(text = cmd))
  }
  if(length(rval) < 2L)
    rval <- rval[[1L]]
  class(rval) <- "bayesx"

  return(rval)
}

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, 9:11 a.m.