R/weight_x.R

#' @export
weight_x <-
function(xrow,xmat,carwt) {
    matchx = apply(xmat,1,function(x,xrow){as.numeric(x == xrow)},xrow)
    t(matchx) %*% carwt
}

Try the SeqAlloc package in your browser

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

SeqAlloc documentation built on May 2, 2019, 3:14 p.m.