Learn R Programming

psytabs (version 1.0)

saveTable: Save a table.

Description

Saves a table either in rtf-format (recommended) or in HTML-format.

Usage

saveTable(x, file, HTML = FALSE, post.editing = TRUE)

Arguments

x
data.frame as generated by the different xTable functions in this package (for example by the mokkenTable function).
file
string; filename the table should be saved as.
HTML
logical value that toggles whether the file format should be HTML.
post.editing
logical value that toggles whether the tables should be post-edited. If true, hard-coded changes to the final table are made. See the details section for further informations.

Value

None

Details

If post-editing is set to true then the code, which is generated by the RTF package, is changed a posteriori.

Examples

Run this code
data(mydata)
test <- demographicTable(mydata$sex, mydata$age_group7, percent=FALSE)
test

#saveTable(test, "test.rtf")

Run the code above in your browser using DataLab