plot.RV: Plot a RV

Description Usage Arguments Examples

Description

Plot a random variable of class "RV"

Usage

1
2
3
4
5
  ## S3 method for class 'RV'
 plot(x, ..., pch = 16, cex = 1.2, lwd = 2,
    col = "black", stretch.x = 1.2, stretch.y = 1.2,
    xlab = "x", ylab = "P(X = x)", xlim = NULL,
    ylim = NULL, expected = TRUE)

Arguments

x

A random variable

...

Additional arguments to be passed to the "plot" function

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting points.

cex

A numerical value giving the amount by which plotting text and symbols should be magnified relative to the default.

lwd

The line width, a positive number, defaulting to 2.

col

A specification for the default plotting color

stretch.x

A numeric by which to extend the x axis limits

stretch.y

A numeric by which to extend the y axis limits

xlab

Label for the X axis

ylab

Label for the Y axis

xlim

Lower and upper limit for the x axis

ylim

Lower and upper limit for the y axis

expected

Logical: If true plots a dashed vertical red line at the expected value

Examples

1
2
fair.die <- make.RV(1:6, rep(1/6, 6))
plot(fair.die)

Dasonk/drvc documentation built on May 6, 2019, 1:37 p.m.