ascii object, which can
then be printed with asciidoc, txt2tags, reStructuredText, org or textile syntax.## S3 method for class 'default':
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", \dots)
## S3 method for class 'ftable':
ascii(x, digits = getOption("digits"), header = TRUE, ...)
## S3 method for class 'summary.table':
ascii(x, caption = NULL, caption.level = NULL, list.type = "bullet", \dots)
## S3 method for class 'list':
ascii(x, caption = NULL, caption.level = NULL, list.type = "bullet", \dots)
## S3 method for class 'sessionInfo':
ascii(x, locale = TRUE, ...)
## S3 method for class 'smooth.spline':
ascii(x, caption = NULL, caption.level = NULL, list.type = "bullet", \dots)
## S3 method for class 'describe':
ascii(x, condense = TRUE, \dots)
## S3 method for class 'meanscomp':
ascii(x, header = TRUE, caption = NULL, include.rownames = TRUE,
include.colnames = TRUE, \dots)
## S3 method for class 'CrossTable':
ascii(x, \dots)
## S3 method for class 'freqtable':
ascii(x, header = TRUE, footer = TRUE, digits =
c(0, 2, 2), format = "f", na.print = "", include.rownames = TRUE,
include.colnames = TRUE, caption = x$label, ...)
## S3 method for class 'survfit':
ascii(x, scale = 1,
print.rmean = getOption("survfit.print.rmean"), rmean =
getOption("survfit.rmean"), include.rownames = TRUE, include.colnames = TRUE,
header = TRUE, ...)
## S3 method for class 'summary.survfit':
ascii(x, include.colnames = TRUE, header =
TRUE, digits = c(0, 0, 0, 3, 3, 3, 3), ...)methods(ascii).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"".".NA should be formatted specially. Default is ""."" to suppress the caption. Default value is NULL.0 to 5, "." (block titles
in asciidoc markup), "s" (s1...99).
Default is 0 (all available width)."topbot" (top and bottom),
"all" (all sides), "none" and "sides" (left and rig"all", "rows", "cols" and "none".
Defa"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."d" (default), "s"
(strong), "e" (emphasis), "m" (monospaced),
NULL).tgroup=c("Major 1","Major 2"), n.tgroup=c(3,3)NULL).NULL).include.colnames = TRUE.NULL).include.colnames = TRUE."bullet", "number", "label" or
"none"). If "label", names(list) is
usedescribe() in package Hmisc).sessionInfo()).scale=365 would scale
the printout to years (see print.survfit() in package survival).print.survfit() in package survival).c("ascii","proto","environment").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 c("ascii","proto","environment").
print.asciidata(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