Learn R Programming

rtables (version 0.3.8)

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")

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 (defualts to outputting "\s").

Value

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

Examples

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

tbl <- build_table(lyt, ex_adsl)
## this just displays it
export_as_txt(tbl, file = NULL)
# }
# NOT RUN {
tf <- tempfile(file.ext = ".txt")
export_as_txt(tt, file = tf)
# }

Run the code above in your browser using DataLab