qqplot_fancy: Make a pretty QQ-Plot

Description Usage Arguments Examples

Description

qqplot_fancy Extends the qqplot() function by using ggplot2 for making a pretty qqplot and adding a best-fitting distribution functionality.

Usage

1
2
qqplot_fancy(sample, dist = "normal", col = sample(ggcols(50)[c(1:5, 17:38,
  47:49)], 1), start = NULL, xlab = NULL, ylab = NULL, title = NULL)

Arguments

sample

A numeric vector with the "actual" observations.

dist

Either (1) a string (default "normal") specifying a known distribution Or (2) another vector of theoretical/model observations. The distribution can be one of beta, exponential, gamma, log-normal, lognormal, normal, pareto, t or weibull.

col

(optional) A string specifying point colour. Defaults to a random colour from the ggplots color wheel.

start

(optional) A list of named starting/initial values for fitditr.

xlab

(optional) A string containing the x axis label.

ylab

(optional) A string containing the y axis label.

title

(optional) A string containing the title.

Examples

1
2
3
4
qqplot_fancy(rnorm(1000)) ## pretty line
qqplot_fancy(rexp(1000), "exponential") ## pretty line
qqplot_fancy(rexp(1000), rexp(1000)) ## pretty line
qqplot_fancy(rnorm(10), col = "blue") ## pretty blue line

InfProbSciX/PeRLib documentation built on May 15, 2019, 8:56 p.m.