Skip to contents

brand_score_attributes() converts one response vector into numeric scores. It is designed to be used inside mutate() on stored attribute data.

Usage

brand_score_attributes(
  response,
  method = c("centered", "integer"),
  dont_know_levels = NULL
)

Arguments

response

A vector of ordered attribute responses. If not a factor, it will be converted to a factor in first-seen order with a warning.

method

Scoring method. Supported values are "centered" and "integer".

dont_know_levels

Optional character vector of response levels treated specially during scoring. For "centered", these levels are scored as 0. For "integer", these levels are scored as NA.

Value

A numeric vector the same length as response.