Learn R Programming

rapport (version 0.51)

rp.qqplot: Q-Q plot with Theoretical Distribution

Description

This function is a wrapper around qqmath which operates only on a numeric variable with optional facet.

Usage

rp.qqplot(x, dist = qnorm, facet = NULL, data = NULL,
    ...)

Arguments

x
a numeric variable
dist
a theoretical distribution
facet
an optional categorical variable to make facets by
data
an optional data frame from which the variables should be taken
...
additional parameters to qqmath

Examples

Run this code
rp.qqplot(ius2008$age)
rp.qqplot(ius2008$age, qunif)
rp.qqplot(ius2008$age, qunif, facet = ius2008$gender)

with(ius2008, rp.qqplot(age))
rp.qqplot(age, data = ius2008)
rp.qqplot(age, facet = gender, data = ius2008)
rp.qqplot(age, qunif, gender, ius2008)
rp.qqplot(ius2008$age, panel = function(x) {panel.qqmath(x); panel.qqmathline(x, distribution = qnorm)} )

Run the code above in your browser using DataLab