vegetable_avail: Compute vegetable availability points

View source: R/prices_scores.R

vegetable_availR Documentation

Compute vegetable availability points

Description

This function takes in the number of varieties of vegetables at a given store and returns the NEMS-S points associated with the availability.

Usage

vegetable_avail(varieties_of_vegetables)

Arguments

varieties_of_vegetables

Number of types of vegetables available.

Details

This function implements the scoring method described in Measure 3 of the NEMS-S Protocol.

Value

The NEMS-S points associated with vegetables availability.

Examples

varieties_of_vegetables <- sample(1:10, 10)
vegetable_avail(varieties_of_vegetables)



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