juice_drinks_cost: Compute beverage cost points

View source: R/prices_scores.R

juice_drinks_costR Documentation

Compute beverage cost points

Description

This function takes in the cost of diet soda, regular soda, 100 percent juice and regular juice drinks and compares them to return an NEMS-S score for the cost.

Usage

juice_drinks_cost(
  diet_soda_price,
  regular_soda_price,
  healthier_juice_drinks_price,
  regular_juice_drinks_price
)

Arguments

diet_soda_price

The price of regular soda.

regular_soda_price

The price of healthier soda.

healthier_juice_drinks_price

The cost of 100 percent juice drinks.

regular_juice_drinks_price

The cost of non 100 percent juice drinks.

Details

This function implements the scoring method described in Table 4.1 Lundsford (2016). "Healthy juice" is 100 percent juice drinks, natural fruit juice with no added sugars. "Regular juice" is fruit juice with added sugar and water.

Value

The NEMS_S points associated with soda price compared to juice price.

Examples

diet_soda_price <- rnorm(10,4.1,.5)
regular_soda_price <- rnorm(10,4.1,.3)
healthier_juice_drinks_price <- rnorm(10,4.1,.5)
regular_juice_drinks_price <- rnorm(10,4.1,.3)

juice_drinks_cost(diet_soda_price, regular_soda_price,
 healthier_juice_drinks_price, regular_juice_drinks_price)


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