[R] Hmisc labels and captions in latex.list()

Dieter Menne dieter.menne at menne-biomed.de
Tue Dec 30 10:18:05 CET 2008

J Michael Dean <mdean77 <at> comcast.net> writes:

> I am trying to feed a list to latex to use with SWeave, and the list  
> comes from contents().  Since it is a list, a caption and label are  
> generated by latex.list - these are not overridden by setting the  
> parameters (such as caption='myCaption', label='myLabel').
> I must clearly be missing something - is there no way to set a caption  
> or label with the latex() function when the object is a list?

dfr <- data.frame(x=rnorm(20),y=sample(c('male','female'),20,TRUE))
cnt <- contents(dfr)
latex(cnt,label="tab:mytab",caption="This is a caption")

Works for me, even if I do not know what the output is good for.


More information about the R-help mailing list