milk_cost: Compute milk cost points

View source: R/prices_scores.R

milk_costR Documentation

Compute milk cost points

Description

This function takes in the cost of low-fat and whole milk and compares them to return a NEMS-S score for the cost.

Usage

milk_cost(lowfat_milk_price, whole_milk_price)

Arguments

lowfat_milk_price

The price of low-fat milk.

whole_milk_price

The price of whole milk.

Details

This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Lowfat milk" is considered skim milk or 1 percent fat, whichever is available.

Value

The NEMS-S points associated with milk price.

Examples

lowfat_milk_price <- rnorm(10,2.8,.5)
whole_milk_price <- rnorm(10,3.1,.3)
milk_cost(lowfat_milk_price, whole_milk_price)

byu-transpolab/nemsr documentation built on Feb. 10, 2023, 11:24 p.m.