Currently, when latex.summary.formula.reverse() has multiple items in its legend (e.g., when test = TRUE and there are categorical and continuous variables present), these are pasted together without spaces. For example: "the upper quartile $c$\ for continuous variables.Numbers after percents are frequencies" (note, no space after the end of the first sentence).
Reproducible example:
library(Hmisc)
test <- data.frame(a = 1:50, b = rep(c('a', 'b'), 25), c = rep(c('c', 'd'), 25))
latex(summary(b ~ a + c, data = test, method = 'reverse', test = TRUE), file = "")
This pull request modifies latex.default() to paste() together the entries with collapse = ' '. Another possibility would be to modify latex.summary.formula.reverse() to collapse the legend before calling latex.default(), but that seemed like a less generalized solution.
Currently, when
latex.summary.formula.reverse()
has multiple items in its legend (e.g., when test = TRUE and there are categorical and continuous variables present), these are pasted together without spaces. For example: "the upper quartile $c$\ for continuous variables.Numbers after percents are frequencies" (note, no space after the end of the first sentence).Reproducible example:
This pull request modifies
latex.default()
topaste()
together the entries withcollapse = ' '
. Another possibility would be to modifylatex.summary.formula.reverse()
to collapse the legend before callinglatex.default()
, but that seemed like a less generalized solution.