質問

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"))?

役に立ちましたか?

解決

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")
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top