View source: R/prices_scores.R
soda_cost | R Documentation |
This function takes in the cost of healthier and regular soda and compares them to return a NEMS-S score for the cost.
soda_cost(diet_soda_price, regular_soda_price)
diet_soda_price |
The price of regular soda. |
regular_soda_price |
The price of healthier soda. |
This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Diet soda" has 0 kcal per serving.
The NEMS_S points associated with soda price.
diet_soda_price <- rnorm(10,4.1,.5) regular_soda_price <- rnorm(10,4.1,.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.