mat_table_to_pdf: Convert a table to direct pdf

Description Usage Arguments See Also Examples

View source: R/table_to_pdf.R

Description

Use tools::texi2pdf

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mat_table_to_pdf(
  x,
  filename = NULL,
  quiet = TRUE,
  is_path_x = FALSE,
  clean_tex = TRUE,
  clean_rest = TRUE,
  copy.mode = TRUE,
 
    plus = "\\usepackage{booktabs}\n\\usepackage{dcolumn}\n\\usepackage{underscore}"
)

table_to_pdf(x)

Arguments

x

the table input

filename

output name

quiet

passed to tools::texi2pdf

is_path_x

whether x is a file on disk

clean_tex, clean_rest

Should remove other files, and tex too?

copy.mode

Argument passed to file.copy to override or not permissions

plus

additional lattex stuff

See Also

mat_pdf_to_png

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
tab <-  data.frame(variable= c("A", "B"), stat = c("mean"), value = 1:2)
tab_xt <- print(xtable::xtable(tab), print.results = FALSE)

mat_table_to_pdf(tab_xt, filename = "filename_test.pdf")
file.remove("filename_test.pdf")
## case 2: file is already on disk, use is_path_x
tmp_file <- tempfile()
print(xtable::xtable(tab), file = tmp_file)
mat_table_to_pdf(tmp_file, filename = "filename_test2.pdf", is_path_x = TRUE)
file.remove("filename_test2.pdf")

## End(Not run)

MatthieuStigler/matPkg documentation built on Aug. 10, 2021, 11:01 a.m.