Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20081230T091721-196@post.gmane.org>
Date: 2008-12-30T09:18:05Z
From: Dieter Menne
Subject: Hmisc labels and captions in latex.list()

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?
> 

library(Hmisc)
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.

Dieter