xqplot: Extended Quantile Plots

Description Usage Arguments Note Examples

Description

An easy way to see a dataset's variables at a glance. Shows uniform quantile plot for numerical varibles and barcharts for factors. Quantile plots also show a horizontal line at the position of the mean and at mean plus or minus one standard deviation.

Usage

1
2
3
4
xqplot(x, ptype = "quantile", labels = dimnames(x)[[2]], ...,
  mfrow = findmfrow(ncol(x)), ask = prod(mfrow) < ncol(x) &&
  dev.interactive(), mcex = 0.8, maxlab = 12, debug = F, mar = c(5, 2,
  3, 1), text.cex.factor = 1, left.labs = F, maxvarnamelength = 20)

Arguments

x

a data frame or list of variables to plot

ptype

"quantile" (default) or "normal": kind of quantile to plot on x axis.

labels

names for each plot

mfrow

number of rows and columns per page. If missing, an attempt is made to choose a reasonable number.

mcex

character expansion factor for marginal text mcex

maxlab

maximum number of categories to label in barcharts

debug

if TRUE, print additional information

mar

size of margins

text.cex.factor

character expansion factor for barchart labels

left.labs

determines placement of barchart labels

maxvarnamelength

maximum length of variable name without splitting on two lines.

...

additional arguments passed to 'plot' command

Note

Bugs: 'mfrow' should take the total number of variables into account if they will fill more than one page so the last page is close to being full.

The current version of the function could be made much simpler and more transparent. Some code is redundant.

Examples

1
2
3
require(car)
xqplot(Prestige)
xqplot(Prestige,"n") # normal quantiles

gmonette/yscs documentation built on May 17, 2019, 7:28 a.m.