View source: R/prices_scores.R
ground_beef_cost | R Documentation |
This function takes in the cost of lean and regular ground beef and compares them to return a NEMS-S score for the cost.
ground_beef_cost(lean_beef_price, regular_beef_price)
lean_beef_price |
The price of lean ground beef. |
regular_beef_price |
The price of normal fat ground beef. |
This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Standard ground beef" is 80 percent lean and 20 percent fat by weight. "Lean ground beef" is 90 percent lean and 10 percent fat (or less fat percentage) by weight.
the NEMS-S points associated with beef price
lean_beef_price <- rnorm(10,5.8,.5) regular_beef_price <- rnorm(10,5.5,.3) ground_beef_cost(lean_beef_price, regular_beef_price)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.