plotDistr: Plot a probability density, mass, or distribution function.

Description Usage Arguments Value Author(s) Examples

View source: R/distributions-plotDistributions-menu.R

Description

This function plots a probability density, mass, or distribution function, adapting the form of the plot as appropriate.

Usage

1
plotDistr(x, p, discrete=FALSE, cdf=FALSE, ...)

Arguments

x

horizontal coordinates

p

vertical coordinates

discrete

is the random variable discrete?

cdf

is this a cumulative distribution (as opposed to mass) function?

...

arguments to be passed to plot.

Value

Produces a plot; returns NULL invisibly.

Author(s)

John Fox jfox@mcmaster.ca

Examples

1
2
x <- seq(-4, 4, length=100)
plotDistr(x, dnorm(x), xlab="Z", ylab="p(z)", main="Standard Normal Density")

Rcmdr2 documentation built on May 31, 2017, 5:03 a.m.

Search within the Rcmdr2 package
Search all R packages, documentation and source code