Hmisc::latex() seems to ignore all the arguments I give it, other than object
. It's hard to point to a specific question I need answered, other than -- "How can I get Hmisc::latex()" to recognize the arguments its documentation says it should?
For example, these two commands produce the same output:
library(Hmisc)
library(tables)
t <- tabular(Species ~ (Sepal.Length + Sepal.Width)*(mean + sd), data = iris)
latex(object = t)
latex(object = t, booktabs = TRUE, align = rep('r', 5))
The output I get from both of these commands is:
\begin{tabular}{lcccc}
\hline
& \multicolumn{2}{c}{Sepal.Length} & \multicolumn{2}{c}{Sepal.Width} \\
Species & mean & sd & mean & \multicolumn{1}{c}{sd} \\
\hline
setosa & $5.006$ & $0.3525$ & $3.428$ & $0.3791$ \\
versicolor & $5.936$ & $0.5162$ & $2.770$ & $0.3138$ \\
virginica & $6.588$ & $0.6359$ & $2.974$ & $0.3225$ \\
\hline
\end{tabular}
I am using Hmisc 4.0-2 and tables 0.8 on R 3.2.2.
Edit: the caption
and caption.loc
arguments seem to be ignored as well. But if I run booktabs()
prior to running latex()
, that does take effect (changes the formatting of the table).