PriceSensitivityMeter: Plots the Van Westendorp Price Sensitivity Meter

View source: R/pricesensitivitymeter.R

PriceSensitivityMeterR Documentation

Plots the Van Westendorp Price Sensitivity Meter

Description

Plots the Van Westendorp Price Sensitivity Meter

Usage

PriceSensitivityMeter(
  x,
  check.prices.ordered = FALSE,
  weights = NULL,
  likelihood.scale = c(0, 0.1, 0.3, 0.5, 0.7),
  output = c("Attitude of respondents", "Likelihood to buy", "Revenue",
    "Likelihood to buy and Revenue")[1],
  resolution = NULL,
  colors = c("#FF0000", "#FF0000", "#008000", "#008000"),
  line.type = c("dot", "solid", "solid", "dot"),
  line.thickness = c(1, 2, 2, 1),
  currency = "$",
  global.font.family = "Arial",
  global.font.color = rgb(44, 44, 44, maxColorValue = 255),
  title.font.size = 16,
  subtitle.font.size = 12,
  footer.font.size = 8,
  legend.font.size = 10,
  hovertext.font.size = 11,
  y.title.font.size = 12,
  x.title.font.size = 12,
  y.tick.font.size = 10,
  x.tick.font.size = 10,
  data.label.font.size = 10,
  hovertext.font.family = global.font.family,
  y.title.font.family = global.font.family,
  y.title.font.color = global.font.color,
  y.tick.font.family = global.font.family,
  y.tick.font.color = global.font.color,
  x.title = "Price",
  x.tick.prefix = currency,
  x.hovertext.format = ".2f",
  y.title = "",
  y.tick.format = "",
  intersection.show = TRUE,
  intersection.arrow.color = global.font.color,
  intersection.arrow.size = 0,
  intersection.arrow.width = 0.7,
  intersection.arrow.length = 10,
  intersection.arrow.standoff = 0,
  intersection.label.font.family = global.font.family,
  intersection.label.font.color = global.font.color,
  intersection.label.font.size = 10,
  intersection.label.decimals = 2,
  intersection.label.wrap = TRUE,
  intersection.label.wrap.nchar = 21,
  font.units = "px",
  ...
)

Arguments

x

Input table containing survey responses in 4 columns At what price would you consider this product/brand to be 1) Very cheap, 2) Cheap, 3) Expensive, 4) Very expensive.

check.prices.ordered

Check that prices supplied in the first 4 columns of x are supplied in increasing order. For backwards compatibility this is off by default.

weights

A numeric vector with length equal to the number of rows in x. They are applied whem computing the proportions of respondents for each question

likelihood.scale

Used in NSM calculation to convert likelihood scale to probabiliy. Default scale assumes a 7 point scale.

output

Type of data to show in the chart. One of "Attitude of respondents", "Likelihood to buy" and "Revenue".

resolution

Numeric; controls the intervals (in terms of price) between which "Proportion of respondents" is computed. For example, set to 0.1, to evaluate proportions every 10 cents. By default, we use observed values.

colors

Character; a vector containing one or more colors specified as hex codes.

line.type

Character; one of 'solid', 'dot', 'dashed'.

line.thickness

Thickness, in pixels, of the series line

currency

Character; Currency symbol to prepend to the intersection labels. These will also be used to set the default prefix to the x tick labels and hovertext.

global.font.family

Character; font family for all occurrences of any font attribute for the chart unless specified individually.

global.font.color

Global font color as a named color in character format (e.g. "black") or an a hex code.

title.font.size

Integer; Title font size; default = 10.

subtitle.font.size

Integer; subtitle font size

footer.font.size

Integer; footer font size

legend.font.size

Integer; Legend font size.

hovertext.font.size

Font size of hover text.

y.title.font.size

Integer; y-axis title font size

x.title.font.size

Integer; x-axis title font size

y.tick.font.size

Integer; y-axis tick label font size

x.tick.font.size

Integer; x-axis tick label font size

data.label.font.size

Integer; Font size for data label.px.

hovertext.font.family

Font family of hover text.

y.title.font.family

Character; y-axis title font family

y.title.font.color

y-axis title font color as a named color in character format (e.g. "black") or a hex code.

y.tick.font.family

Character; y-axis tick label font family

y.tick.font.color

y-axis tick label font color as a named color in character format (e.g. "black") or an a hex code.

x.title

Character, x-axis title; defaults to chart input values; to turn off set to "FALSE".

x.tick.prefix

x-axis tick label prefix

x.hovertext.format

A string representing a d3 formatting code. See https://github.com/mbostock/d3/wiki/Formatting#numbers

y.title

Character, y-axis title; defaults to chart input values; to turn off set to "FALSE".

y.tick.format

A string representing a d3 formatting code. See https://github.com/d3/d3/blob/master/API.md#number-formats-d3-format

intersection.show

Logical; Whether to show labels to the intersection points of the lines.

intersection.arrow.color

Color of the arrows to the intersection points.

intersection.arrow.size

Size of the arrows to the intersection points.

intersection.arrow.width

Width of the arrow heads.

intersection.arrow.length

Scaling factor controlling length of arrows.

intersection.arrow.standoff

Distance between arrowhead and intersection point.

intersection.label.font.family

Character; intersection.label font family

intersection.label.font.color

intersection.label font color as a named color in character format (e.g. "black") or an a hex code.

intersection.label.font.size

Integer; intersection label font size

intersection.label.decimals

Integer; number of decimals to show on intersection label.

intersection.label.wrap

Logical; whether the intersection label text should be wrapped.

intersection.label.wrap.nchar

Number of characters (approximately) in each line of the intersection label when intersection.label.wrap TRUE.

font.units

One of "px" of "pt". By default all font sizes are specified in terms of pixels ("px"). But changing this to "pt" will mean that the font sizes will be in terms points ("pt"), which will be consistent with font sizes in text boxes.

...

Other charting parameters passed to Line.


NumbersInternational/flipStartup documentation built on Feb. 26, 2024, 5:39 a.m.