View source: R/prices_scores.R
milk_cost | R Documentation |
This function takes in the cost of low-fat and whole milk and compares them to return a NEMS-S score for the cost.
milk_cost(lowfat_milk_price, whole_milk_price)
lowfat_milk_price |
The price of low-fat milk. |
whole_milk_price |
The price of whole milk. |
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.
The NEMS-S points associated with milk price.
lowfat_milk_price <- rnorm(10,2.8,.5) whole_milk_price <- rnorm(10,3.1,.3) milk_cost(lowfat_milk_price, whole_milk_price)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.