Created
February 5, 2018 18:07
-
-
Save bryanmayer/082a92d43a1fb58108b4b456b502b55a to your computer and use it in GitHub Desktop.
wrapper for using xtable and print.xtable. Does not handle long tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print_xtable = function(table_in, | |
caption = "FILL IN CAPTION", | |
digits = NULL, | |
align = NULL, | |
include.rownames = F, | |
comment = F, | |
sanitize.text.function = function(x) x, | |
xtable.options = NULL, | |
return_xtable = F, | |
...){ | |
tex_table = do.call("xtable", c(list(table_in, caption = caption, digits = digits, align = align), | |
xtable.options)) | |
if(return_xtable) return(tex_table) | |
print(tex_table, | |
sanitize.text.function = sanitize.text.function, include.rownames = include.rownames, | |
...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment