ascii object, which can then be
printed with asciidoc, txt2tags, reStructuredText, org, textile or
pandoc syntax.
"ascii"(x, include.rownames = TRUE, include.colnames = TRUE, rownames = NULL, colnames = NULL, format = "f", digits = 2, decimal.mark = ".", na.print = "", caption = NULL, caption.level = NULL, width = 0, frame = NULL, grid = NULL, valign = NULL, header = TRUE, footer = FALSE, align = NULL, col.width = 1, style = NULL, tgroup = NULL, n.tgroup = NULL, talign = "c", tvalign = "middle", tstyle = "h", bgroup = NULL, n.bgroup = NULL, balign = "c", bvalign = "middle", bstyle = "h", lgroup = NULL, n.lgroup = NULL, lalign = "c", lvalign = "middle", lstyle = "h", rgroup = NULL, n.rgroup = NULL, ralign = "c", rvalign = "middle", rstyle = "h", list.type = "bullet", ...)
"ascii"(x, condense = TRUE, ...)
"ascii"(x, vnames = c("labels", "names"), prUnits = TRUE, lgroup = list(dimnames(stats)[[1]], if (ul) vlabels else at$vname[at$vname != ""]), n.lgroup = list(1, at$nlevels), include.rownames = FALSE, include.colnames = TRUE, format = "nice", caption = paste(at$ylabel, if (ns > 1) paste(" by", if (ul) at$strat.label else at$strat.name), " N = ", at$n, if (at$nmiss) paste(", ", at$nmiss, " Missing", sep = ""), sep = ""), caption.level = "s", header = TRUE, ...)
"ascii"(x, digits, prn = any(n != N), pctdig = 0, npct = c("numerator", "both", "denominator", "none"), exclude1 = TRUE, vnames = c("labels", "names"), prUnits = TRUE, sep = "/", formatArgs = NULL, round = NULL, prtest = c("P", "stat", "df", "name"), prmsd = FALSE, pdig = 3, eps = 0.001, caption = paste("Descriptive Statistics", if (length(x$group.label)) paste(" by", x$group.label) else paste(" (N = ", x$N, ")", sep = ""), sep = ""), caption.level = "s", include.rownames = FALSE, include.colnames = TRUE, colnames = gl, header = TRUE, lgroup = lgr, n.lgroup = n.lgr, rgroup = rgr, n.rgroup = n.rgr, rstyle = "d", ...)
"ascii"(x, twoway = nvar == 2, prnmiss = any(stats$Missing > 0), prn = TRUE, formatArgs = NULL, caption = a$heading, caption.level = "s", include.rownames = FALSE, include.colnames = TRUE, header = TRUE, format = "nice", lgroup = v, n.lgroup = rep(length(z), length(v)), ...)
"ascii"(x, locale = TRUE, ...)
"ascii"(x, scale = 1, print.rmean = getOption("survfit.print.rmean"), rmean = getOption("survfit.rmean"), include.rownames = TRUE, include.colnames = TRUE, header = TRUE, ...)
ascii(x, ...)methods(ascii). If x is a list, it should
be a list of character strings (it will produce a
bulleted list output by default).TRUE the rows
names are printed. Default value depends of class of
x.TRUE the
columns names are printed. Default value depends of class
of x.NULL (default) the row names are not
modifiedNULL (default) the column names are
not modifiedformatC function. Use "d"
(for integers), "f", "e", "E",
"g", "G", "fg" (for reals), or
"s" (for strings). "f" gives numbers in
the usual xxx.xxx format; "e" and
"E" give n.ddde+nn or n.dddE+nn
(scientific format); "g" and "G" put
x[i] into scientific format only if it saves space
to do so. "fg" uses fixed format as "f",
but digits as number of significant digits.
Note that this can lead to quite long result strings.
Finaly, "nice" is like "f", but with 0
digits if x is an integer. Default depends on the
class of x.2.".".NA should be formatted specially. Default is ""."" to
suppress the caption. Default value is NULL.0 to 5, "." (block
titles in asciidoc markup), "s" (strong),
"e" (emphasis), "m" (monospaced) or
"" (no markup). Default is NULL.1... 99). Default
is 0 (all available width)."topbot" (top and bottom), "all" (all
sides), "none" and "sides" (left and
right). The default value is NULL."all",
"rows", "cols" and "none". Default
is NULL."top", "bottom" and
"middle". Default is "".TRUE or
1, 2, ..., the first line(s) of the
table is (are) emphasized. The default value depends of
class of x.TRUE or
1, the last line(s) of the table is (are)
emphasized. The default value depends of class of
x."r" (right), "l" (left) and "c"
(center). Default value is NULL.1."d" (default), "s" (strong), "e"
(emphasis), "m" (monospaced), "h" (header)
"a" (cells can contain any of the AsciiDoc
elements that are allowed inside document), "l"
(literal), "v" (verse; all line breaks are
retained). Default is NULL.NULL).tgroup=c("Major 1","Major 2"),
n.tgroup=c(3,3) if "Major 1" is to span
columns 1-3 and "Major 2" is to span columns 4-6.NULL).NULL).include.colnames = TRUE.NULL).include.colnames = TRUE."bullet",
"number", "label" or "none"). If
"label", names(list) is used for labels.
Default is "bullet".describe() in package
Hmisc).summary.formula
in package Hmisc).FALSE to suppress printing
or latexing units attributes of variables (see
summary.formula in package Hmisc).TRUE to print the number of
non-missing observations on the current (row) variable
(see summary.formula in package Hmisc).summary.formula in package Hmisc).summary.formula in
package Hmisc).method="reverse"
objects will be printed, plotted, or typeset by removing
redundant entries from percentage tables for categorical
variables (see summary.formula in package
Hmisc).method="reverse" tables (see
summary.formula in package Hmisc).format.default (see summary.formula
in package Hmisc).round to round the quantiles
and optional mean and standard deviation to round
digits after the decimal point (see
summary.formula in package Hmisc).test=TRUE (see summary.formula in
package Hmisc).TRUE to print mean and SD
after the three quantiles, for continuous variables (see
summary.formula in package Hmisc).summary.formula
in package Hmisc).eps will be printed
as < eps (see summary.formula in package
Hmisc).summary.formula in package
Hmisc).FALSE to suppress printing
counts of missing valuesscale=365 would scale the printout to years (see
print.survfit() in package survival).print.survfit() in
package survival).print.survfit() in package
survival)."asciiTable", "asciiList" or "asciiMixed".
x. For example, summary.table objects produce a
bulleted list while data.frame objects produce a table of
the entire data.frame.Sometimes, arguments are not active, depending of the features implemented in the markup language generated. All arguments are active when asciidoc syntax is produced.
The available method functions for ascii are given by
methods(ascii). Users can extend the list of available
classes by writing methods for the generic function ascii.
All method functions should return an object of class
"ascii".
data(esoph)
ascii(esoph[1:10,])
tab <- table(esoph$agegp, esoph$alcgp)
ascii(tab)
print(ascii(tab), type = "t2t")
print(ascii(tab), type = "rest")
print(ascii(tab), type = "org")
ascii(summary(tab))
Run the code above in your browser using DataLab