ascii
object, which can then be printed with Asciidoc, txt2tags or textile syntax.## S3 method for class 'default':
ascii(x,
include.rownames = TRUE, include.colnames = TRUE,
format = "f", digits = 2, decimal.mark = ".", na.print = "",
caption = "", width = 0, frame = "", grid = "", valign = "",
header = TRUE, footer = FALSE, align = "", col.width = 1, style = "", \dots)
## S3 method for class 'describe':
ascii(x, condense = TRUE, \dots)
## S3 method for class 'summary.table':
ascii(x, caption = "", list.type = "bullet", \dots)
## S3 method for class 'list':
ascii(x, caption = "", list.type = "bullet", \dots)
## S3 method for class 'smooth.spline':
ascii(x, caption = "", 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
."."
.NA
should be formatted specially. Default is "".""
to suppress the caption. Default value is ""
.1
...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 contdescribe()
in package Hmisc
)."bullet"
, "number"
or "none"
).
Default is "bullet"
.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. All arguments are active when Asciidoc syntax is produced. Whith txt2tags, grid
,
valign
, col.width
and style
are inactive.
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")
ascii(summary(tab))
Run the code above in your browser using DataCamp Workspace