Learn R Programming

rehh (version 3.2.2)

distribplot: Plot distribution of standardized iHS, Rsb or XP-EHH values

Description

Plot the observed distribution of standardized iHS, Rsb or XP-EHH values together with the standard Gaussian distribution.

Usage

distribplot(
  data,
  lty = 1,
  lwd = 1.5,
  col = c("blue", "red"),
  qqplot = FALSE,
  resolution = 0.01,
  ...
)

Arguments

data

a vector of iHS, Rsb or XPEHH values.

lty

line type.

lwd

line width.

col

a vector describing the colors of the observed and Gaussian distribution, respectively.

qqplot

logical. If TRUE a qq-plot is drawn instead of the distribution density curve.

resolution

affects only qqplot. Rasterize data points to a quadratic grid with the specified resolution and remove duplicate points. Defaults to 0.01.

...

further arguments passed to plot.default.

Value

The function returns a plot.

See Also

ihh2ihs, ines2rsb, ies2xpehh, manhattanplot.

Examples

Run this code
# NOT RUN {
library(rehh.data)
#results from a genome scan (44,057 SNPs) see ?wgscan.cgu for details
data(wgscan.cgu)
#extract vector with iHS values from data frame
IHS <- ihh2ihs(wgscan.cgu)$ihs[["IHS"]]
distribplot(IHS, main = "iHS (CGU population)")
distribplot(IHS, main = "iHS (CGU population)", qqplot = TRUE)
# }

Run the code above in your browser using DataLab