R/getLPSscore.R

Defines functions getLPSscore

#' A function rather aimed at developers
#' @noRd

getLPSscore = function(vdat, coefs){
  tmp = which(is.na(vdat))
  if(length(tmp) > 0){
    vdat = vdat[-tmp]
    coefs = coefs[-tmp]
  }
  aScore = mapply(function(x,y){x*y}, x=vdat, y=coefs)
  aScore = sum(unlist(aScore))
  return(aScore)
}
ajiangsfu/PRPS documentation built on April 29, 2023, 10:13 p.m.