cereal_cost: Compute cereal cost points

View source: R/prices_scores.R

cereal_costR Documentation

Compute cereal cost points

Description

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

Usage

cereal_cost(healthier_cereal_price, regular_cereal_price)

Arguments

healthier_cereal_price

The price of healthier cereal.

regular_cereal_price

The price of regular cereal.

Details

This function implements the scoring method described in Table 4.1 of Lundsford (2016). "Healthier cereal" has less than 7g of sugar per serving.

Value

The NEMS-S points associated with cereal cost.

Examples

healthier_cereal_price <- rnorm(10,4.1,.5)
regular_cereal_price <- rnorm(10,3.5,.3)
cereal_cost(healthier_cereal_price, regular_cereal_price )

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