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).
as_nps(x)
Arguments
x
Numeric variable to pass through.
Valid range is 0 to 10 inclusive, otherwise returns an error message.