as_nps: Convert numeric variable to NPS variable

View source: R/as_nps.R

as_npsR Documentation

Convert numeric variable to NPS variable

Description

Convert a bounded numeric variable from 0 to 10 (inclusive) to a labelled vector where 0 to 6 is a Detractor, 7 to 8 is a Passive, and 9 to 10 is a Promoter. The mean of the returned variable gives the Net Promoter Score (NPS).

Usage

as_nps(x)

Arguments

x

Numeric variable to pass through. Valid range is 0 to 10 inclusive, otherwise returns an error message.


martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.