R/quadFuncVarHom.R

Defines functions .quadFuncVarHom

.quadFuncVarHom <- function( data, xName, homWeights, deflator, 
      xSubtract = NULL ) {

   if( is.null( homWeights ) | ! xName %in% names( homWeights ) ) {
      result <- data[[ xName ]]
   } else {
      result <- data[[ xName ]] / deflator
      if( !is.null( xSubtract ) ) {
         result <- result - data[[ xSubtract ]] / deflator
      }
   }

   return( result )
}

Try the micEcon package in your browser

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

micEcon documentation built on Jan. 7, 2021, 3:01 p.m.