quick-output: Quickly print objects to a PDF, TeX, HTML, Microsoft Office...

Description Usage Arguments Details Value Examples

Description

These functions use huxtable to print objects to an output document. They are useful as one-liners for data reporting.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
quick_latex(
  ...,
  file = confirm("huxtable-output.tex"),
  borders = 0.4,
  open = interactive()
)

quick_pdf(
  ...,
  file = confirm("huxtable-output.pdf"),
  borders = 0.4,
  open = interactive(),
  width = NULL,
  height = NULL
)

quick_html(
  ...,
  file = confirm("huxtable-output.html"),
  borders = 0.4,
  open = interactive()
)

quick_docx(
  ...,
  file = confirm("huxtable-output.docx"),
  borders = 0.4,
  open = interactive()
)

quick_pptx(
  ...,
  file = confirm("huxtable-output.pptx"),
  borders = 0.4,
  open = interactive()
)

quick_xlsx(
  ...,
  file = confirm("huxtable-output.xlsx"),
  borders = 0.4,
  open = interactive()
)

quick_rtf(
  ...,
  file = confirm("huxtable-output.rtf"),
  borders = 0.4,
  open = interactive()
)

Arguments

...

One or more huxtables or R objects with an as_huxtable method.

file

File path for the output.

borders

Border width for members of ... that are not huxtables.

open

Logical. Automatically open the resulting file?

width

String passed to the LaTeX geometry package"s paperwidth option. Use NULL for the default width.

height

String passed to geometry"s paperheight option. Use NULL for the default height.

Details

Objects in ... will be converted to huxtables, with borders added.

If ‘file’ is not specified, the command will fail in non-interactive sessions. In interactive sessions, the default file path is "huxtable-output.xxx" in the working directory; if this already exists, you will be asked to confirm manually before proceeding.

Value

Invisible NULL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  m <- matrix(1:4, 2, 2)

  quick_pdf(m, jams)
  quick_latex(m, jams)
  quick_html(m, jams)
  quick_docx(m, jams)
  quick_xlsx(m, jams)
  quick_pptx(m, jams)
  quick_rtf(m, jams)

## End(Not run)

huxtable documentation built on July 1, 2020, 7:13 p.m.