spinner_plot: Constructs a spinner

Description Usage Arguments Value Author(s) Examples

View source: R/spinner_plot.R

Description

Constructs a spinner with different regions

Usage

1
  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

Author(s)

Jim Albert

Examples

1
2
3
4
5
6
  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))

Example output

Loading required package: LearnBayes
Loading required package: ggplot2
Loading required package: gridExtra
Loading required package: dplyr

Attaching package: 'dplyr'

The following object is masked from 'package:gridExtra':

    combine

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: shiny

TeachBayes documentation built on May 1, 2019, 9:17 p.m.