Learn R Programming

rtables (version 0.4.0)

export_as_txt: Export as plain text with page break symbol

Description

Export as plain text with page break symbol

Usage

export_as_txt(
  tt,
  file = NULL,
  paginate = FALSE,
  ...,
  page_break = "\\s\\n"
)

Arguments

tt

TableTree (or related class). A TableTree object representing a populated table.

file

character(1). File to write.

paginate

logical(1). Should tt be paginated before writing the file.

Passed directly to paginate_table

page_break

character(1). Page break symbol (defaults to outputting "\s").

Value

file (this function is called for the side effect of writing the file.

See Also

export_as_pdf

Examples

Run this code
# NOT RUN {
lyt <- basic_table() %>%
  split_cols_by("ARM") %>%
  analyze(c("AGE", "BMRKR2", "COUNTRY"))

tbl <- build_table(lyt, ex_adsl)

cat(export_as_txt(tbl, file = NULL, paginate = TRUE, lpp = 8))

# }
# NOT RUN {
tf <- tempfile(fileext = ".txt")
export_as_txt(tbl, file = tf)
system2("cat", tf)
# }

Run the code above in your browser using DataLab