chips_cost: Compute chips cost points

View source: R/prices_scores.R

chips_costR Documentation

Compute chips cost points

Description

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

Usage

chips_cost(lowfat_chips_price, regular_chips_price)

Arguments

lowfat_chips_price

The price of lowfat chips.

regular_chips_price

The price of regular chips.

Details

This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Lowfat chips" contain less than or equal to 3g of fat per 1oz serving.

Value

The NEMS-S points associated with chips cost.

Examples

lowfat_chips_price <- rnorm(10,2.5,.5)
regular_chips_price <- rnorm(10,2.8,.3)
chips_cost(lowfat_chips_price, regular_chips_price)

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