R/bayessurvreg1.checkStore.R

Defines functions bayessurvreg1.checkStore

Documented in bayessurvreg1.checkStore

####################################################
#### AUTHOR:     Arnost Komarek                 ####
####             (2004)                         ####
####                                            ####
#### FILE:       bayessurvreg1.checkStore.R     ####
####                                            ####
#### FUNCTIONS:  bayessurvreg1.checkStore       ####
####################################################

### ======================================
### bayessurvreg1.checkStore
### ======================================
bayessurvreg1.checkStore <- function(store)
{
  if(length(store) == 0) instore <- "arnost"
  else                   instore <- names(store)

  iy <- match("y", instore, nomatch=NA)
  if(is.na(iy)) store$y <- FALSE
  if (!is.logical(store$y)) store$y <- FALSE

  ir <- match("r", instore, nomatch=NA)
  if(is.na(ir)) store$r <- FALSE
  if (!is.logical(store$r)) store$r <- FALSE

  ib <- match("b", instore, nomatch=NA)
  if(is.na(ib)) store$b <- FALSE
  if (!is.logical(store$b)) store$b <- FALSE

  iu <- match("u", instore, nomatch=NA)
  if(is.na(iu)) store$u <- FALSE
  if (!is.logical(store$u)) store$u <- FALSE

  iMHb <- match("MHb", instore, nomatch=NA)
  if(is.na(iMHb)) store$MHb <- FALSE
  if (!is.logical(store$MHb)) store$MHb <- FALSE

  irr <- match("regresres", instore, nomatch=NA)
  if(is.na(irr)) store$regresres <- FALSE
  if (!is.logical(store$regresres)) store$regresres <- FALSE
  
  return(store)  
}  

Try the bayesSurv package in your browser

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

bayesSurv documentation built on May 2, 2019, 3:26 a.m.