Closed yacinehmito closed 5 years ago
Sorry this bug was introduced in the last release. It is fixed for the next release.
Hi- I just installed Hmisc from github using devtools and this issue is still present in current github code. Sorry to be a pain, but this is important for an application. Is there any chance you can provide some type of a patch for the meantime until the next release?
Please provide a tiny example that fails, and describe what fails.
data(anscombe) a4t <- rbind(anscombe,round(apply(anscombe,2,mean),2),round(apply(anscombe,2,sd),2))
latex table: the R code executes fine, and produces file tables/a4table.tex:
w <- latex(a4t,file="tables/a4table.tex",title="",label="tab:a4dat",rowlabel="",ctable=TRUE,caption="Anscombe's Quartet with mean and standard deviation",caption.loc="bottom",where="!htbp",rgroup=c("Data","Summary"),n.rgroup=c(11,2),rowname=c("","","","","","","","","","","","mean","sd"),cgroup=c("Pair 1","Pair 2","Pair 3","Pair 4"),n.cgroup=c(2,2,2,2))
The failure comes from attempting to latex the output, latex crashes with the following error:
ERROR: Package xkeyval Error: botcapcaption' undefined in families
ctbl'.
This is the (abbreviated) file hmisc::latex() produces: \ctable[botcapcaption={Anscombe's Quartet with mean and standard deviation},label=tab:a4dat,pos=!htbp,]{lrrcrrcrrcrr}{}{\FL
When I manually edit the file include a comma between "botcap" and "caption" as per ctable documentation, so that the resulting file looks like:
\ctable[botcap,caption={Anscombe's Quartet with mean and standard deviation},label=tab:a4dat,pos=!htbp,]{lrrcrrcrrcrr}{}{\FL
Then the document compiles fine with latex and produces exact desired output.
I just committed the fix to Github.
Hi,
The
caption.loc="bottom"
option in the latex function is not operational anymore ; it doesn't write the caption. I updated to 3.14-3 from 3.14-0 today and it made my captions disappear. For now they will stay on top of the table (not a major issue then). I didn't have the courage to jump into the code to directly look at the problem, sorry. Maybe it has already been fixed.