R/whichIt.R

whichIt <- function (burnIn,
                     iterations,
                     thinTo) {

  # Determine which iterations will be kept.
  if (burnIn == 0) {

    return (ceiling(seq(from = 1,
                        to = iterations,
                        length.out = thinTo)))

  } else {

    return (ceiling(seq(from = burnIn * iterations,
                        to = iterations,
                        length.out = thinTo)))

  }

}

Try the baycn package in your browser

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

baycn documentation built on Aug. 1, 2020, 1:07 a.m.