R/wccmap.R

Defines functions wccmap

Documented in wccmap

wccmap <- function(x, obj) {
  codes <- x$codes
  trwdth <- x$trwdth
  wccs <- rep(0, nrow(codes))
  if (trwdth > 0)
    wghts <- 1 - (0:trwdth)/trwdth
  else
    wghts <- 1
  
  acor <- wac(obj, trwdth, wghts)
  for (i in 1:nrow(codes))
    wccs[i] <- wcc(obj, codes[i,], trwdth, wghts,
                   c(acor, x$acors[i]))

  wccs
}

Try the wccsom package in your browser

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

wccsom documentation built on May 30, 2017, 12:52 a.m.