cereal_avail: Compute healthier cereal availability points

View source: R/prices_scores.R

cereal_availR Documentation

Compute healthier cereal availability points

Description

This function takes in the number of varieties of healthier cereal options and returns the NEMS-S points associated with availability.

Usage

cereal_avail(healthier_cereal_varieties)

Arguments

healthier_cereal_varieties

The number of varieties of cereal with less than 7g of sugar per serving.

Details

This function implements the scoring method described in Measure 11 of the NEMS-S Protocol. "Healthier cereal" has less than 7g of sugar per serving.

Value

The NEMS-S points associated with healthier cereal availability.

Examples

healthier_cereal_varieties <- sample(1:10, 10)
cereal_avail(healthier_cereal_varieties)

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