bread_avail: Compute whole grain bread availability points

View source: R/prices_scores.R

bread_availR Documentation

Compute whole grain bread availability points

Description

This function takes in the number of varieties of whole grain bread and returns the NEMS-S points associated with availability.

Usage

bread_avail(varieties_of_whole_grain_bread)

Arguments

varieties_of_whole_grain_bread

The number of types of whole grain bread available.

Details

This function implements the scoring method described in Measure 9 of the NEMS-S Protocol. "Whole grain bread" is 100 percent whole wheat and whole grain bread, and it is the healthier option.

Value

The NEMS-S points associated with whole grain bread availability.

Examples

varieties_of_whole_grain_bread <- sample(1:10, 10)
bread_avail(varieties_of_whole_grain_bread)

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