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)))

  }

}
Evatar/baycn documentation built on Aug. 1, 2020, 6:31 p.m.