ascii
object, which can
then be printed with asciidoc, txt2tags, sphinx or org 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 = "", caption.level = "", width = 0, frame = "",
grid = "", valign = "", header = TRUE, footer = FALSE,
align = "", col.width = 1, style = "", cgroup = NULL,
n.cgroup = NULL, calign = "", cvalign = "", cstyle = "",
rgroup = NULL, n.rgroup = NULL, ralign = "", rvalign = "",
rstyle = "", \dots)
## S3 method for class 'describe':
ascii(x, condense = TRUE, \dots)
## S3 method for class 'summary.table':
ascii(x, caption = "", caption.level = "", list.type = "bullet", \dots)
## S3 method for class 'list':
ascii(x, caption = "", caption.level = "", list.type = "bullet", \dots)
## S3 method for class 'smooth.spline':
ascii(x, caption = "", caption.level = "", list.type = "bullet", \dots)
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 modified"."
.NA
should be formatted specially. Default is "".""
to suppress the caption. Default value is ""
.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
the first line of the table is emphasized. The default value depends of class of x
.TRUE
the last line of the table is emphasized. The default value depends of class of x
."r"
(right), "l"
(left) and "c"
(center).
Default value is ""
."d"
(default), "e"
(emphasis), "m"
(monospaced),
"a"
(cells can contNULL
).cgroup=c("Major 1","Major 2")
, n.cgroup=c(3,3)
if "Major
NULL
).include.colnames = TRUE
.describe()
in package Hmisc
)."bullet"
, "number"
, "label"
or
"none"
). If "label"
, names(list)
is
usec("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.ascii
data(esoph)
ascii(esoph[1:10,])
tab <- table(esoph$agegp, esoph$alcgp)
ascii(tab)
print(ascii(tab), type = "t2t")
print(ascii(tab), type = "sphinx")
print(ascii(tab), type = "org")
ascii(summary(tab))
Run the code above in your browser using DataLab