harrelfe / Hmisc

Harrell Miscellaneous
Other
208 stars 81 forks source link

How can I block some default printed caption in summaryM #75

Open raffdoc opened 7 years ago

raffdoc commented 7 years ago

Dear Prof Harrell I would like to exclude some default printed caption in summaryM when I apply latex(), for example, a b c represent the lower quartile a, the median b, and the upper quartile c for continuous variables. x ± s represents X ̄ ± 1 SD. N is the number of non-missing values. or , event better, to be able to submit my own string (in different language). How can I reach it? Thanks beforehand.

harrelfe commented 7 years ago

See the insert.bottom argument to latex.summaryM

raffdoc commented 7 years ago

Yes, I have read the manual , and tried to set insert.bottom to FALSE but it does not give the result I wanted.

harrelfe commented 7 years ago

Please add detail including the code, the desired result, and the result obtained by the code.

raffdoc commented 7 years ago

Here is my example out_tab2 <- summaryM(Var1 + Var2 + Var3 ~ 1 ,data=tab2) latex(out_tab2, file='', npct="both",prmsd=TRUE, middle.bold=TRUE, digits=1, append=FALSE, caption="\\textit{Dati preioperatori}", size="script size", pdig = 2,what='%', legend.bottom = T, insert.bottom = F) So I don't want to include the part of a b c represent the lower quartile a, the median b, and the upper quartile c for continuous variables. x ± s represents X ̄ ± 1 SD. N is the number of non-missing values. just under the table, for me it is fine the tests' names and reference to them. Thanks PS: I am writing in Italian screen shot 2017-06-12 at 20 53 22

couthcommander commented 7 years ago

The insert.bottom argument can also take a character string. Use insert.bottom = "" to print nothing, or supply your own string.

raffdoc commented 7 years ago

Thanks @couthcommander it works. Can I ask other question on same table as you see above (previous comment of mine), pdf that is generated from rmd -> latex-> pdf trows out this wired output %latex.default(cstats, title = title, file = file, append = TRUE, caption = finalcaption, rowlabel = rowlabel, table.env = (!tabenv1 && table.env) || (tabenv1 && istr == 1), col.just = col.just, numeric.dollar = FALSE, insert.bottom = finallegend, rowname = lab, dcolumn = dcolumn, extracolheads = extracolheads, extracolsize = NNsize, insert.top = if (strat != “.ALL.”) strat, . . . )% Rmd chunks is

load("data/out_table1.RData")
latex(out_tab1,file='', npct="both",prmsd=TRUE,  middle.bold=TRUE,digits=1, append=FALSE, caption = "\\textit{Dati preioperatori}",size = "scriptsize",pdig = 2,what = '%',
      legend.bottom = T, 
      insert.bottom = "BSA: Superfice corporea; ACEF: ")

First of all what is it, I have been using Hmisc year, this is first time I see this kind of behaviour. Thanks beforehand