View source: R/prices_scores.R
milk_avail | R Documentation |
This function takes in the number of lowfat and whole milk varieties at a given store and returns the NEMS-S points associated with the availability.
milk_avail(lowfat_milk_varieties, whole_milk_varieties)
lowfat_milk_varieties |
The number of low fat milk cartons available. |
whole_milk_varieties |
The number of whole milk cartons available. |
This function implements the scoring method described in Measure 1 of the NEMS-S Protocol. "Low-fat milk" is considered skim milk or 1 percent fat, whichever is available.
The NEMS-S points associated with milk availability.
lowfat_milk_varieties <- rnorm(10,,) whole_milk_varieties <- rnorm(10,,) milk_avail(lowfat_milk_varieties, whole_milk_varieties)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.