A function to compare two vectors extensively.
comparisonplot(
  x,
  y,
  histbreaks = 30,
  adjust = 1,
  colpal = "heat",
  simulate = FALSE,
  daltonize = FALSE,
  cvd = "p",
  alpha = NULL,
  rev = FALSE,
  main = "comparisonplot",
  cor = FALSE,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ab = FALSE,
  add.density = FALSE,
  col.density = "darkred",
  pimp = FALSE,
  ...
)a numeric vector.
a numeric vector.
a non-negative integer specifying the number of breaks of the histograms.
scale the used bandwidth of the density estimate, if add.density = TRUE.
a character vector containing R built-in color names or a name of a LSD colorpalette as a character string (see disco() or disco).
logical: if TRUE (FALSE by default), a converted colorpalette is used to simulate dichromat vision according to http://www.daltonize.org (see daltonize).
logical: if TRUE (FALSE by default), a converted colorpalette is used to enhance dichromat vision according to http://www.daltonize.org (see daltonize).
character string implying the type of color vision deficiency ("p" for protanope, "d" for deuteranope or "t" for tritanope).
alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).
logical: if TRUE (FALSE by default), a reversed colorpalette is used.
title(s) of the plot, standard graphics parameter.
if TRUE (FALSE by default), the correlation is added to the title.
x label, standard graphics parameter.
y label, standard graphics parameter.
x limits, standard graphics parameter.
y limits, standard graphics parameter.
if TRUE (FALSE by default), abline(0,1) is added to the heatscatter.
if TRUE (FALSE by default), density lines are added to the barplots.
R built-in color to specify the color of the density line.
if TRUE (FALSE by default), the plot is pimped.
additional parameters to be passed to points and plot.
# NOT RUN {
points = 10^4
x = c(rnorm(points/2),rnorm(points/2)+4)
y = x + rnorm(points,sd=0.8)
x = sign(x)*abs(x)^1.3
comparisonplot(x,y,histbreaks=30,pch=20)
# }
Run the code above in your browser using DataLab