Learn R Programming

ProbBayes (version 1.1)

spinner_plot: Constructs a spinner

Description

Constructs a spinner with different regions

Usage

spinner_plot(probs, ...)

Arguments

probs

vector of probabilities for the spins 1, 2, ...

...

optional vector of values and title

Value

A ggplot2 object containing the spinner display

Examples

Run this code
# NOT RUN {
  probs <- rep(.2, 5)
  spinner_plot(probs,
         values=c("A", "B", "C", "D", "E"),
         title="My Spinner")
  # probs does not need to be normalized
  spinner_plot(c(1, 2, 1, 2))
# }

Run the code above in your browser using DataLab