View source: R/mpf_exporters.R
| export_as_txt | R Documentation |
This function converts x to a MatrixPrintForm object via matrix_form(), paginates it
via paginate_to_mpfs(), converts each page to ASCII text via toString(), and outputs
the strings, separated by page_break, to file.
export_as_txt(
x,
file = NULL,
page_type = NULL,
landscape = FALSE,
pg_width = page_dim(page_type)[if (landscape) 2 else 1],
pg_height = page_dim(page_type)[if (landscape) 1 else 2],
font_family = "Courier",
font_size = 8,
lineheight = 1L,
margins = c(top = 0.5, bottom = 0.5, left = 0.75, right = 0.75),
paginate = TRUE,
cpp = NA_integer_,
lpp = NA_integer_,
...,
hsep = NULL,
indent_size = 2,
tf_wrap = paginate,
max_width = NULL,
colwidths = NULL,
min_siblings = 2,
nosplitin = character(),
rep_cols = NULL,
verbose = FALSE,
page_break = "\\s\\n",
page_num = default_page_number(),
fontspec = font_spec(font_family, font_size, lineheight),
col_gap = 3,
round_type = c("iec", "sas")
)
x |
( |
file |
( |
page_type |
( |
landscape |
( |
pg_width |
( |
pg_height |
( |
font_family |
( |
font_size |
( |
lineheight |
( |
margins |
( |
paginate |
( |
cpp |
( |
lpp |
( |
... |
additional parameters passed to |
hsep |
( |
indent_size |
( |
tf_wrap |
( |
max_width |
( |
colwidths |
( |
min_siblings |
( |
nosplitin |
( |
rep_cols |
( |
verbose |
( |
page_break |
( |
page_num |
( |
fontspec |
( |
col_gap |
( |
round_type |
( |
If x has a num_rep_cols method, the value returned by it will be used for rep_cols by
default. Otherwise, 0 will be used.
If x has an applicable do_forced_paginate method, it will be invoked during the
pagination process.
If file is NULL, the full paginated and concatenated string value is returned,
otherwise the output is written to file and no value (invisible NULL) is returned.
export_as_txt(basic_matrix_form(mtcars), pg_height = 5, pg_width = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.