View source: R/prices_scores.R
bread_cost | R Documentation |
This function takes in the cost of whole wheat bread and white bread and compares them to return a NEMS-S score for the cost.
bread_cost(whole_wheat_bread_price, white_bread_price)
whole_wheat_bread_price |
The cost of whole wheat bread. |
white_bread_price |
The cost of white bread. |
This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Whole grain bread" is 100 percent whole wheat and whole grain bread, and it is the healthier option. "White bread" is the regular option, bread made with refined flour.
The NEMS-S points associated with bread cost.
whole_wheat_bread_price <- rnorm(10,1.5,.5) white_bread_price <- rnorm(10,1.5,.3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.