plot_probability_mass_function: plot_probability_mass_function

Description Usage Arguments Value Examples

Description

Generates a good looking graph representing a probability mass function.

Usage

1
2
plot_probability_mass_function(fun, x_start, x_end, title = NULL,
  subtitle = NULL, caption = NULL, ...)

Arguments

fun

a parameterized probability mass function receiving a single x parameter

x_start

the left most position that will be displayed on the x axis

x_end

the right most position that will be displayed on the x axis

Value

a good looking graph

Examples

1
2
3
fun <- function(x, ...) { return(dpois(x = x, lambda = 5, log = FALSE))  }
graph <- plot_probability_mass_function(fun = fun, x_start = 0, x_end = 20)
graph

daviddoret/GRCRToolkit documentation built on May 23, 2019, 7:31 a.m.