dReport {greport} | R Documentation |
Descriptive Statistics Report
Description
Generate graphics and LaTeX with descriptive statistics
Usage
dReport(
formula,
groups = NULL,
what = c("box", "proportions", "xy", "byx"),
byx.type = c("violin", "quantiles"),
violinbox = TRUE,
violinbox.opts = list(col = adjustcolor("blue", alpha.f = 0.25), border = FALSE),
summaryPsort = FALSE,
exclude1 = TRUE,
stable = TRUE,
fun = NULL,
data = NULL,
subset = NULL,
na.action = na.retain,
panel = "desc",
subpanel = NULL,
head = NULL,
tail = NULL,
continuous = 10,
h = 5.5,
w = 5.5,
outerlabels = TRUE,
append = FALSE,
sopts = NULL,
popts = NULL,
lattice = FALSE
)
Arguments
formula |
a formula accepted by the |
groups |
a superpositioning variable, usually treatment, for categorical charts. For continuous analysis variables, |
what |
|
byx.type |
set to |
violinbox |
set to |
violinbox.opts |
a list to pass to |
summaryPsort |
set to |
exclude1 |
logical used for |
stable |
set to |
fun |
a function that takes individual response variables (which may be matrices, as in |
data |
data frame |
subset |
a subsetting epression for the entire analysis |
na.action |
a NA handling function for data frames, default is |
panel |
character string. Name of panel, which goes into file base names and figure labels for cross-referencing |
subpanel |
If calling |
head |
character string. Specifies initial text in the figure caption, otherwise a default is used |
tail |
optional character string. Specifies final text in the figure caption, e.g., what might have been put in a footnote in an ordinary text page. This appears just before any needles. |
continuous |
the minimum number of numeric values a variable must have in order to be considered continuous. Also passed to |
h |
numeric. Height of plot, in inches |
w |
numeric. Width of plot |
outerlabels |
logical that if |
append |
logical. Set to |
sopts |
list specifying extra arguments to pass to |
popts |
list specifying extra arguments to pass to a plot method. One example is |
lattice |
set to |
Details
dReport
generates multi-panel charts, separately for categorical analysis variables and continuous ones. The Hmisc summaryP
function and its plot method are used for categorical variables, and bpplotM
is used to make extended box plots for continuous ones unless what='byx'
. Stratification is by treatment or other variables. The user must have defined a LaTeX macro \eboxpopup
(which may be defined to do nothing) with one argument. This macro is called with argument extended box plot
whenever that phrase appears in the legend, so that a PDF
popup may be generated to show the prototype. See the example in report.Rnw
in the tests
directory. Similarly a popup macro \qintpopup
must be defined, which generates a tooltip for the phrase quantile intervals
.
Examples
# See test.Rnw in tests directory