xqplot | R Documentation |
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.
xqplot(
x,
ptype = "quantile",
labels = dimnames(x)[[2]],
...,
mfrow = findmfrow(ncol(x)),
ask = FALSE,
mcex = 0.8,
maxlab = 12,
debug = F,
mar = c(4, 2.5, 4, 1),
xlab.pos = 2,
xlab.cex = 0.7,
sublab.pos = xlab.pos + xlab.cex * 1.15,
text.cex.factor = 1,
left.labs = F,
class = TRUE,
xaxs = "i",
maxvarnamelength = 20
)
xqplot_(
x,
ptype = "quantile",
labels = names(x),
...,
mfrow = findmfrow(length(x)),
ask = FALSE,
mcex = 0.8,
maxlab = 12,
debug = F,
mar = c(4, 2.5, 4, 1),
xlab.pos = 2,
xlab.cex = 0.7,
sublab.pos = xlab.pos + xlab.cex * 1.15,
text.cex.factor = 1,
left.labs = F,
class = TRUE,
xaxs = "i",
maxvarnamelength = 20
)
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 |
... |
additional arguments passed to 'plot' command |
mfrow |
number of rows and columns per page. If missing, an attempt is made to choose a reasonable number. |
ask |
if TRUE pause after each page, default: FALSE |
mcex |
character expansion factor for marginal text
|
maxlab |
maximum number of categories to label in barcharts |
debug |
if TRUE, print additional information |
mar |
size of margins |
xlab.pos |
position of xlab, default: 2 |
xlab.cex |
cex for xlab, default: .7 |
sublab.pos |
position for sublab, default: xlab.pos + xlab.cex * 1.15 |
text.cex.factor |
character expansion factor for barchart labels |
left.labs |
determines placement of barchart labels |
class |
show class of object, default: TRUE |
xaxs |
style of x axis, default: 'i' |
maxvarnamelength |
maximum length of variable name without splitting on two lines. |
xqplot_()
: experimental version to handle data.frames with list elements
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.
require(car)
xqplot(Prestige)
xqplot(Prestige,"n") # normal quantiles
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.