View source: R/prices_scores.R
juice_cost | R Documentation |
This function takes in the cost of healthier and regular juice and compares them to return a NEMS-S score for the cost.
juice_cost(healthier_juice_drinks_price, regular_juice_drinks_price)
healthier_juice_drinks_price |
The cost of 100 percent juice drinks. |
regular_juice_drinks_price |
The cost of non 100 percent juice drinks. |
This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Healthy juice" is 100 percent juice drinks, natural fruit juice with no added sugars. "Regular juice" is fruit juice with added sugar and water.
The NEMS_S points associated with juice drinks cost.
healthier_juice_drinks_price <- rnorm(10,4.1,.5) regular_juice_drinks_price <- rnorm(10,4.1,.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.