FeatureByNPS: Displays a feature by a Net Promoter Score (NPS) variable

View source: R/DataUnderstanding.R

FeatureByNPSR Documentation

Displays a feature by a Net Promoter Score (NPS) variable

Description

A special modification of function FeatureByTargetVariable to incorporate the commonly used Net Promoter Score Variable with three levels (Detractor, Neutral and Promoter)

Usage

FeatureByNPS(DataFrame, Feature, NPSVariable)

Arguments

DataFrame

data.frame. data.frame under investigation.

Feature

vector. Feature variable.

NPSVariable

factor. Net Promoter Score with categories.

Details

: Please make sure that the colors match the categories - Currently, alphabetical order of categories will be used.

Examples

# generate a small dataset
NPSdata <- data.frame(Feat = sample(x = 1:4, size = 20, replace = T),
                      NPS = sample(x = c("Detractor", "Neutral", "Promoter"), size = 20, replace = T))
FeatureByNPS(DataFrame = NPSdata, Feature = "Feat", NPSVariable = "NPS")

masem-research/masemDataUnderstanding documentation built on May 5, 2022, 12:40 a.m.