toString | R Documentation |
toString
Transform a complex object into a string representation ready to be printed or written to a plain-text file
toString(x, ...)
## S4 method for signature 'MatrixPrintForm'
toString(
x,
widths = NULL,
tf_wrap = FALSE,
max_width = NULL,
col_gap = mf_colgap(x),
hsep = default_hsep()
)
x |
ANY. Object to be prepared for rendering. |
... |
Passed to individual methods. |
widths |
numeric (or NULL). (proposed) widths for the columns
of |
tf_wrap |
logical(1). Should the texts for title, subtitle, and footnotes be wrapped? |
max_width |
integer(1), character(1) or NULL. Width that title
and footer (including footnotes) materials should be
word-wrapped to. If NULL, it is set to the current print width
of the session ( |
col_gap |
numeric(1). Space (in characters) between columns |
hsep |
character(1). Characters to repeat to create header/body separator line. |
Manual insertion of newlines is not supported when tf_wrap
is on
and will result in a warning and undefined wrapping behavior. Passing
vectors of already split strings remains supported, however in this
case each string is word-wrapped separately with the behavior
described above.
A character string containing the ASCII rendering
of the table-like object represented by x
mform <- basic_matrix_form(mtcars)
cat(toString(mform))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.