View source: R/prices_scores.R
baked_goods_cost | R Documentation |
This function takes in the cost of healthier and regular baked goods and compares them to return a NEMS-S score for the cost.
baked_goods_cost(healthier_baked_goods_price, regular_baked_goods_price = NULL)
healthier_baked_goods_price |
The price of lower fat baked goods. |
regular_baked_goods_price |
The price of normal fat baked goods. |
This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Low-fat baked goods" are baked goods with less than or equal to 3 grams of fat per serving.
The NEMS-S points associated with baked goods price.
healthier_baked_goods_price <- rnorm(10,3.2,.5) regular_baked_goods_price <- rnorm(10,3.0,.3) baked_goods_cost(healthier_baked_goods_price, regular_baked_goods_price)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.