| write_text | R Documentation |
Write the human-readable rendering of a writeup, review or AI review to a file: the text print shows, laid out for a document. write_result writes the same objects as JSON documents for programs to read.
write_text(x, file, format = NULL, overwrite = FALSE, verbosity = 1L, ...)
x |
|
file |
Character: Path of the file to write. |
format |
Optional Character {"markdown"}: Output format. NULL selects
the format from the extension of |
overwrite |
Logical: If TRUE, replace an existing file. |
verbosity |
Integer: Verbosity level. |
... |
Not used. |
Markdown output starts at ## headings and uses pipe tables, ready to
convert with Pandoc or Quarto or to paste into a manuscript.
The path of the file written, invisibly.
EDG
idx <- c(1:40, 51:90, 101:140)
mod <- train(
iris[idx, ],
dat_test = iris[-idx, ],
hyperparameters = setup_CART(),
verbosity = 0L
)
write_text(writeup(mod), file.path(tempdir(), "writeup.md"))
write_text(review(mod), file.path(tempdir(), "review.md"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.