fruit_avail: Compute fruit availability points

View source: R/prices_scores.R

fruit_availR Documentation

Compute fruit availability points

Description

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

Usage

fruit_avail(varieties_of_fruit)

Arguments

varieties_of_fruit

The number of fruit types available.

Details

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

Value

The NEMS-S points associated with fruit availability.

Examples

varieties_of_fruit <- sample(1:10, 10)
fruit_avail(varieties_of_fruit)



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