soda_avail: Compute the availability points associated with diet soda

View source: R/prices_scores.R

soda_availR Documentation

Compute the availability points associated with diet soda

Description

This function takes in the number of varieties of diet sodas available and returns the NEMS-S points associated with availability.

Usage

soda_avail(diet_soda_varieties)

Arguments

diet_soda_varieties

The number of diet sodas available.

Details

This function implements the scoring method described in Measure 8 of the NEMS-S Protocol. "Diet soda" has 0 kcal per serving.

Value

The NEMS-S points associated with availability of diet soda.

Examples

diet_soda_varieties <- sample(0:3, 10)
soda_avail(diet_soda_varieties)

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