baked_goods_cost: Compute baked goods cost points

View source: R/prices_scores.R

baked_goods_costR Documentation

Compute baked goods cost points

Description

This function takes in the cost of healthier and regular baked goods and compares them to return a NEMS-S score for the cost.

Usage

baked_goods_cost(healthier_baked_goods_price, regular_baked_goods_price = NULL)

Arguments

healthier_baked_goods_price

The price of lower fat baked goods.

regular_baked_goods_price

The price of normal fat baked goods.

Details

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.

Value

The NEMS-S points associated with baked goods price.

Examples

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)


byu-transpolab/nemsr documentation built on Feb. 10, 2023, 11:24 p.m.