export2pdf: Exports tables to PDF files.

Description Usage Arguments Note See Also Examples

Description

This function creates automatically a PDF with the table. Also, the LaTeX code is stored in the specified file.

Usage

1
export2pdf(x, file, compile = TRUE, openfile = FALSE, margin = c(2,2,1,1), ...)

Arguments

x

an object of class 'createTable' or that inherits it.

file

character specifying the PDF file resulting after compiling the LaTeX code corresponding to the table specified in the 'x' argument. LaTeX code is also stored in the same folder with the same name but .tex extension. When 'compile' argument is FALSE, only .tex file is saved.

compile

logical indicating whether tex file is compiled using texi2pdf function. Default value is TRUE.

openfile

logical indicating whether to open the compiled pdf file or not. Currently deprectated. Deafult value is FALSE.

margin

an integer vector specifying the margins in cm. Its components refer to 'top', 'bottom', 'left' and 'right' sides. Default values are 2, 2, 1 and 1, respectively.

...

Arguments passed to export2latex.

Note

To make the .tex file be compiled, some LaTeX compiler such as Miktex must be installed. Also, the tex file must include the following LaTeX packages:

See Also

createTable, export2latex, export2csv, export2html, export2md, export2word

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

require(compareGroups)
data(regicor)

 # example on an ordinary table
res <- createTable(compareGroups(year ~ . -id, regicor), hide = c(sex=1), hide.no = 'no')
export2pdf(res, file=tempfile(fileext=".pdf"), size="small")


## End(Not run)

compareGroups documentation built on May 27, 2019, 5:01 p.m.