Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to to export from reporttools?

I am using tableNominal{reporttools} to produce frequency tables. The way I understand it, tableNominal() produces latex code which has to be copied and pasted onto a text file and then saved as .tex. But is it possible to simple export the table produced as can be done in print(xtable(table), file="path/outfile.tex"))?

like image 402
user702432 Avatar asked Jan 28 '26 18:01

user702432


1 Answers

You may be able to use either latex or latexTranslate from the "Hmisc" package for this purpose. If you have the necessary program infrastructure the output gets sent to your TeX engine. (You may be able to improve the level of our answers by adding specific examples.)

Looks like that function does not return a character vector, so you need to use a strategy to capture the output from cat(). Using the example in the help page:

capture.output( TN <- tableNominal(vars = vars, weights = weights, group = group, 
         cap = "Table of nominal variables.", lab = "tab: nominal") , 
         file="outfile.tex")
like image 56
IRTFM Avatar answered Jan 30 '26 06:01

IRTFM



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!