R/subset.ensembleBMAgamma.R

`[.ensembleBMAgamma` <-
function(x,d) {
#
# copyright 2006-present, University of Washington. All rights reserved.
# for terms of use, see the LICENSE file
#
  d <- as.character(d) 
  if (any(!dateCheck(d))) stop("improperly specified dates")
  m <- match( d, names(x$nIter), nomatch = 0)
  if (any(!m)) stop("dates not matched in model")
  x$training$table <- x$training$table[d]
  x$biasCoefs <- x$biasCoefs[,d,drop = FALSE]
  x$varCoefs <- x$varCoefs[,d,drop = FALSE]
  x$weights <- x$weights[,d,drop = FALSE]
  x$nIter <- x$nIter[d]
  attr(x,"call") <- list(attr(x,"call"), match.call())
  x
}

Try the ensembleBMA package in your browser

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

ensembleBMA documentation built on Jan. 20, 2018, 9:24 a.m.