npc: Create Net Promoter Categories from Likelihood to Recommend...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function produces Net Promoter Categories for numeric or integer Recommend data

Usage

1
npc(x, breaks = getOption("nps.breaks"))

Arguments

x

A vector of Recommend scores

breaks

A vector of length three, giving integer Likert scale break-points for Net Promoter categories. Best practice is to set the values you'd like to use at the start of a session, with options(nps.breaks = c(0, 6, 8, 10)) (for the usual setting of 0-6 being Detractors, 7-8 being Passives and 9-10 being Promoters, also the package default), or whichever values you would like. However, a vector may be supplied directly.

Value

Net Promoter categories

Author(s)

Brendan Rocks foss@brendanrocks.com

See Also

nps

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# The command below will generate Net Promoter categories for each point
# on a standard 0:10 Likelihood to Recommend scale
npc(0:10)

 # Here's how scores and categories map out. Notice that scores which are
 # 'off the scale' drop out as missing/invalid
data.frame(score = -2:12, category = npc(-2:12))

# When you have lots of data, summaries are useful
x <- sample(
  0:10, 1000, replace = TRUE,
  prob = c(0.02, 0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.09, 0.22, 0.22, 0.35)
)

# A Histrogram of the Likelihood to Recommend scores we just generated
hist(x, breaks=-1:10)

# A look at the by nps category using summary
summary(npc(x))

# As above
table(npc(x))

# As a crosstabulation
table(x, npc(x))

nps(x)

brendan-r/NPS documentation built on May 13, 2019, 5:08 a.m.